slim down runtime

This commit is contained in:
dcode 2019-04-04 02:25:22 +02:00
parent 85f3fc54a7
commit 25c5dfddad
94 changed files with 22219 additions and 34648 deletions

View File

@ -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";

View File

@ -1,13 +1,12 @@
/// <reference path="./collector/index.d.ts" />
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 (<u32>minCapacity > <u32>(MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH);
let oldData = array.data;
let newByteLength = minCapacity << alignLog2;
let newData = runtime.reallocate(changetype<usize>(oldData), <usize>newByteLength); // registers on move
let newData = reallocate(changetype<usize>(oldData), <usize>newByteLength); // registers on move
if (newData !== changetype<usize>(oldData)) {
array.data = changetype<ArrayBuffer>(newData); // links
array.dataStart = newData;

View File

@ -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 {

View File

@ -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!

View File

@ -1,60 +0,0 @@
/// <reference path="./collector/index.d.ts" />
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<usize>();
/** 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<usize>(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<usize>(root));
else if (isDefined(__ref_release)) __ref_release(ref);
}
}
}
}

View File

@ -1,8 +1,7 @@
/// <reference path="./collector/index.d.ts" />
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

View File

@ -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<T>(): 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<usize>(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<HEADER>(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<HEADER>(memory.allocate(newAdjustedSize));
newHeader.classId = header.classId;
if (isDefined(__ref_collect)) {
newHeader.reserved1 = 0;
newHeader.reserved2 = 0;
}
let newRef = changetype<usize>(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<usize>(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(<usize>length << 1), __runtime_id<String>());
return register(allocate(<usize>length << 1), __runtime_id<String>());
}
/** 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(<usize>byteLength), __runtime_id<ArrayBuffer>());
return register(allocate(<usize>byteLength), __runtime_id<ArrayBuffer>());
}
/** 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<i32[]>()), id);
var array = register(allocate(offsetof<i32[]>()), id);
var bufferSize = <usize>length << alignLog2;
var buffer = runtime.register(runtime.allocate(bufferSize), __runtime_id<ArrayBuffer>());
var buffer = register(allocate(bufferSize), __runtime_id<ArrayBuffer>());
changetype<ArrayBufferView>(array).data = changetype<ArrayBuffer>(buffer); // links
changetype<ArrayBufferView>(array).dataStart = buffer;
changetype<ArrayBufferView>(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<usize>(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<usize>(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();

View File

@ -1,3 +1 @@
import "allocator/arena";
// export { memory };

View File

@ -1,4 +1,4 @@
import "allocator/tlsf";
import "collector/itcm";
// export { memory, gc };
export { runtime };

View File

@ -1,8 +1,7 @@
/// <reference path="./collector/index.d.ts" />
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

View File

@ -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<u8>(dest++, load<u8>(src++));
n--;
}
// // copy 1 byte each until src is aligned to 4 bytes
// while (n && (src & 3)) {
// store<u8>(dest++, load<u8>(src++));
// n--;
// }
// if dst is aligned to 4 bytes as well, copy 4 bytes each
if ((dest & 3) == 0) {
while (n >= 16) {
store<u32>(dest , load<u32>(src ));
store<u32>(dest + 4, load<u32>(src + 4));
store<u32>(dest + 8, load<u32>(src + 8));
store<u32>(dest + 12, load<u32>(src + 12));
src += 16; dest += 16; n -= 16;
}
if (n & 8) {
store<u32>(dest , load<u32>(src ));
store<u32>(dest + 4, load<u32>(src + 4));
dest += 8; src += 8;
}
if (n & 4) {
store<u32>(dest, load<u32>(src));
dest += 4; src += 4;
}
if (n & 2) { // drop to 2 bytes each
store<u16>(dest, load<u16>(src));
dest += 2; src += 2;
}
if (n & 1) { // drop to 1 byte
store<u8>(dest++, load<u8>(src++));
}
return;
}
// // if dst is aligned to 4 bytes as well, copy 4 bytes each
// if ((dest & 3) == 0) {
// while (n >= 16) {
// store<u32>(dest , load<u32>(src ));
// store<u32>(dest + 4, load<u32>(src + 4));
// store<u32>(dest + 8, load<u32>(src + 8));
// store<u32>(dest + 12, load<u32>(src + 12));
// src += 16; dest += 16; n -= 16;
// }
// if (n & 8) {
// store<u32>(dest , load<u32>(src ));
// store<u32>(dest + 4, load<u32>(src + 4));
// dest += 8; src += 8;
// }
// if (n & 4) {
// store<u32>(dest, load<u32>(src));
// dest += 4; src += 4;
// }
// if (n & 2) { // drop to 2 bytes each
// store<u16>(dest, load<u16>(src));
// dest += 2; src += 2;
// }
// if (n & 1) { // drop to 1 byte
// store<u8>(dest++, load<u8>(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<u32>(src);
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
n -= 3;
while (n >= 17) {
x = load<u32>(src + 1);
store<u32>(dest, w >> 24 | x << 8);
w = load<u32>(src + 5);
store<u32>(dest + 4, x >> 24 | w << 8);
x = load<u32>(src + 9);
store<u32>(dest + 8, w >> 24 | x << 8);
w = load<u32>(src + 13);
store<u32>(dest + 12, x >> 24 | w << 8);
src += 16; dest += 16; n -= 16;
}
break;
}
case 2: {
w = load<u32>(src);
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
n -= 2;
while (n >= 18) {
x = load<u32>(src + 2);
store<u32>(dest, w >> 16 | x << 16);
w = load<u32>(src + 6);
store<u32>(dest + 4, x >> 16 | w << 16);
x = load<u32>(src + 10);
store<u32>(dest + 8, w >> 16 | x << 16);
w = load<u32>(src + 14);
store<u32>(dest + 12, x >> 16 | w << 16);
src += 16; dest += 16; n -= 16;
}
break;
}
case 3: {
w = load<u32>(src);
store<u8>(dest++, load<u8>(src++));
n -= 1;
while (n >= 19) {
x = load<u32>(src + 3);
store<u32>(dest, w >> 8 | x << 24);
w = load<u32>(src + 7);
store<u32>(dest + 4, x >> 8 | w << 24);
x = load<u32>(src + 11);
store<u32>(dest + 8, w >> 8 | x << 24);
w = load<u32>(src + 15);
store<u32>(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<u32>(src);
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// n -= 3;
// while (n >= 17) {
// x = load<u32>(src + 1);
// store<u32>(dest, w >> 24 | x << 8);
// w = load<u32>(src + 5);
// store<u32>(dest + 4, x >> 24 | w << 8);
// x = load<u32>(src + 9);
// store<u32>(dest + 8, w >> 24 | x << 8);
// w = load<u32>(src + 13);
// store<u32>(dest + 12, x >> 24 | w << 8);
// src += 16; dest += 16; n -= 16;
// }
// break;
// }
// case 2: {
// w = load<u32>(src);
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// n -= 2;
// while (n >= 18) {
// x = load<u32>(src + 2);
// store<u32>(dest, w >> 16 | x << 16);
// w = load<u32>(src + 6);
// store<u32>(dest + 4, x >> 16 | w << 16);
// x = load<u32>(src + 10);
// store<u32>(dest + 8, w >> 16 | x << 16);
// w = load<u32>(src + 14);
// store<u32>(dest + 12, x >> 16 | w << 16);
// src += 16; dest += 16; n -= 16;
// }
// break;
// }
// case 3: {
// w = load<u32>(src);
// store<u8>(dest++, load<u8>(src++));
// n -= 1;
// while (n >= 19) {
// x = load<u32>(src + 3);
// store<u32>(dest, w >> 8 | x << 24);
// w = load<u32>(src + 7);
// store<u32>(dest + 4, x >> 8 | w << 24);
// x = load<u32>(src + 11);
// store<u32>(dest + 8, w >> 8 | x << 24);
// w = load<u32>(src + 15);
// store<u32>(dest + 12, x >> 8 | w << 24);
// src += 16; dest += 16; n -= 16;
// }
// break;
// }
// }
// }
// copy remaining bytes one by one
if (n & 16) {
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
}
if (n & 8) {
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
}
if (n & 4) {
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
}
if (n & 2) {
store<u8>(dest++, load<u8>(src++));
store<u8>(dest++, load<u8>(src++));
}
if (n & 1) {
store<u8>(dest++, load<u8>(src++));
}
}
// // copy remaining bytes one by one
// if (n & 16) {
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// }
// if (n & 8) {
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// }
// if (n & 4) {
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// }
// if (n & 2) {
// store<u8>(dest++, load<u8>(src++));
// store<u8>(dest++, load<u8>(src++));
// }
// if (n & 1) {
// store<u8>(dest++, load<u8>(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) {

View File

@ -45,3 +45,49 @@ export function adjust(payloadSize: usize): usize {
// MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32)
return <usize>1 << <usize>(<u32>32 - clz<u32>(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<HEADER>(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<HEADER>(memory.allocate(newAdjustedSize));
newHeader.classId = header.classId;
if (isDefined(__ref_collect)) {
newHeader.reserved1 = 0;
newHeader.reserved2 = 0;
}
let newRef = changetype<usize>(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<usize>(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;
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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)
call $start:constructor
(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 $null (; 24 ;) (type $FUNCSIG$v)
(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 (; 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
)
)

View File

@ -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 $null (; 41 ;) (type $FUNCSIG$v)
(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 $~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
)
)

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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<usize>(ref));
runtime.retain(changetype<usize>(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<usize>(ref));
runtime.release(changetype<usize>(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);

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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)

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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<HEADER>(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<HEADER>(ref2 - HEADER_SIZE);
assert(header2.payloadSize == barrier2);

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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
)
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5
tests/compiler/wasi.json Normal file
View File

@ -0,0 +1,5 @@
{
"asc_flags": [
"--runtime none"
]
}

View File

@ -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

View File

@ -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