runtime api

This commit is contained in:
dcode 2019-04-03 21:47:38 +02:00
parent cc1e4cd004
commit 85f3fc54a7
69 changed files with 1016 additions and 982 deletions

View File

@ -483,7 +483,7 @@ export namespace BuiltinSymbols {
export const runtime_reallocate = "~lib/runtime/runtime.reallocate";
export const runtime_register = "~lib/runtime/runtime.register";
export const runtime_discard = "~lib/runtime/runtime.discard";
export const runtime_makeArray = "~lib/runtime/runtime.makeArray";
export const runtime_newArray = "~lib/runtime/runtime.newArray";
// std/gc.ts
export const gc_mark_roots = "~lib/gc/__gc_mark_roots";

View File

@ -184,5 +184,7 @@ export namespace CommonSymbols {
export const reallocate = "reallocate";
export const register = "register";
export const discard = "discard";
export const makeArray = "makeArray";
export const newString = "newString";
export const newArrayBuffer = "newArrayBuffer";
export const newArray = "newArray";
}

View File

@ -6944,13 +6944,13 @@ export class Compiler extends DiagnosticEmitter {
// otherwise allocate a new array header and make it wrap a copy of the static buffer
} else {
// makeArray(length, classId, alignLog2, staticBuffer)
let expr = this.makeCallDirect(assert(program.makeArrayInstance), [
// newArray(length, alignLog2, classId, staticBuffer)
let expr = this.makeCallDirect(assert(program.newArrayInstance), [
module.createI32(length),
module.createI32(arrayInstance.ensureId()),
program.options.isWasm64
? module.createI64(elementType.alignLog2)
: module.createI32(elementType.alignLog2),
module.createI32(arrayInstance.ensureId()),
program.options.isWasm64
? module.createI64(i64_low(bufferAddress), i64_high(bufferAddress))
: module.createI32(i64_low(bufferAddress))
@ -6974,17 +6974,17 @@ export class Compiler extends DiagnosticEmitter {
var flow = this.currentFlow;
var tempThis = flow.getTempLocal(arrayType, false);
var tempDataStart = flow.getTempLocal(arrayBufferInstance.type);
var makeArrayInstance = assert(program.makeArrayInstance);
var newArrayInstance = assert(program.newArrayInstance);
var stmts = new Array<ExpressionRef>();
// tempThis = makeArray(length, classId, alignLog2, source = 0)
// tempThis = newArray(length, alignLog2, classId, source = 0)
stmts.push(
module.createSetLocal(tempThis.index,
this.makeCallDirect(makeArrayInstance, [
this.makeCallDirect(newArrayInstance, [
module.createI32(length),
module.createI32(arrayInstance.ensureId()),
program.options.isWasm64
? module.createI64(elementType.alignLog2)
: module.createI32(elementType.alignLog2),
module.createI32(arrayInstance.ensureId()),
program.options.isWasm64
? module.createI64(0)
: module.createI32(0)

View File

@ -374,8 +374,8 @@ export class Program extends DiagnosticEmitter {
discardInstance: Function | null = null;
/** Runtime register function. `register(ref: usize, cid: u32): usize` */
registerInstance: Function | null = null;
/** Runtime make array function. `makeArray(capacity: i32, source: usize = 0, cid: u32): usize` */
makeArrayInstance: Function | null = null;
/** Runtime make array function. `newArray(length: i32, alignLog2: usize, id: u32, source: usize = 0): usize` */
newArrayInstance: Function | null = null;
/** The kind of garbage collector being present. */
collectorKind: CollectorKind = CollectorKind.NONE;
@ -844,9 +844,9 @@ export class Program extends DiagnosticEmitter {
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
this.registerInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
}
if (element = this.lookupGlobal(BuiltinSymbols.runtime_makeArray)) {
if (element = this.lookupGlobal(BuiltinSymbols.runtime_newArray)) {
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
this.makeArrayInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
this.newArrayInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
}
// memory allocator interface
if (element = this.lookupGlobal("__mem_allocate")) {

View File

@ -43,7 +43,7 @@ export class Array<T> extends ArrayBufferView {
static create<T>(capacity: i32 = 0): Array<T> {
if (<u32>capacity > <u32>MAX_BYTELENGTH >>> alignof<T>()) throw new RangeError(E_INVALIDLENGTH);
var array = changetype<Array<T>>(runtime.makeArray(capacity, __runtime_id<Array<T>>(), alignof<T>()));
var array = changetype<Array<T>>(runtime.newArray(capacity, alignof<T>(), __runtime_id<Array<T>>()));
memory.fill(array.dataStart, 0, <usize>array.dataLength);
array.length_ = 0; // !
return array;
@ -233,7 +233,7 @@ export class Array<T> extends ArrayBufferView {
concat(other: Array<T>): Array<T> {
var thisLen = this.length_;
var otherLen = select(0, other.length_, other === null);
var out = changetype<Array<T>>(runtime.makeArray(thisLen + otherLen, __runtime_id<Array<T>>(), alignof<T>()));
var out = changetype<Array<T>>(runtime.newArray(thisLen + otherLen, alignof<T>(), __runtime_id<Array<T>>()));
var outStart = out.dataStart;
var thisSize = <usize>thisLen << alignof<T>();
if (isManaged<T>()) {
@ -321,7 +321,7 @@ export class Array<T> extends ArrayBufferView {
map<U>(callbackfn: (value: T, index: i32, array: Array<T>) => U): Array<U> {
var length = this.length_;
var out = changetype<Array<U>>(runtime.makeArray(length, __runtime_id<Array<U>>(), alignof<U>()));
var out = changetype<Array<U>>(runtime.newArray(length, alignof<U>(), __runtime_id<Array<U>>()));
var outStart = out.dataStart;
for (let index = 0; index < min(length, this.length_); ++index) {
let value = load<T>(this.dataStart + (<usize>index << alignof<T>()));
@ -347,7 +347,7 @@ export class Array<T> extends ArrayBufferView {
}
filter(callbackfn: (value: T, index: i32, array: Array<T>) => bool): Array<T> {
var result = changetype<Array<T>>(runtime.makeArray(0, __runtime_id<Array<T>>(), alignof<T>()));
var result = changetype<Array<T>>(runtime.newArray(0, alignof<T>(), __runtime_id<Array<T>>()));
for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) {
let value = load<T>(this.dataStart + (<usize>index << alignof<T>()));
if (callbackfn(value, index, this)) result.push(value);
@ -435,7 +435,7 @@ export class Array<T> extends ArrayBufferView {
begin = begin < 0 ? max(begin + length, 0) : min(begin, length);
end = end < 0 ? max(end + length, 0) : min(end , length);
length = max(end - begin, 0);
var slice = changetype<Array<T>>(runtime.makeArray(length, __runtime_id<Array<T>>(), alignof<T>()));
var slice = changetype<Array<T>>(runtime.newArray(length, alignof<T>(), __runtime_id<Array<T>>()));
var sliceBase = slice.dataStart;
var thisBase = this.dataStart + (<usize>begin << alignof<T>());
if (isManaged<T>()) {
@ -467,7 +467,7 @@ export class Array<T> extends ArrayBufferView {
var length = this.length_;
start = start < 0 ? max<i32>(length + start, 0) : min<i32>(start, length);
deleteCount = max<i32>(min<i32>(deleteCount, length - start), 0);
var result = changetype<Array<T>>(runtime.makeArray(deleteCount, __runtime_id<Array<T>>(), alignof<T>()));
var result = changetype<Array<T>>(runtime.newArray(deleteCount, alignof<T>(), __runtime_id<Array<T>>()));
var resultStart = result.dataStart;
var thisStart = this.dataStart;
var thisBase = thisStart + (<usize>start << alignof<T>());

View File

@ -1,7 +1,7 @@
// The runtime provides common functionality that links runtime interfaces for memory management
// and garbage collection to the standard library, making sure it all plays well together.
import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "./util/runtime";
import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "./util/runtime";
import { HEAP_BASE, memory } from "./memory";
import { ArrayBufferView } from "./arraybuffer";
@ -20,6 +20,7 @@ export declare function __runtime_instanceof(id: u32, superId: u32): bool;
export class runtime {
private constructor() { return unreachable(); }
/** Determines whether a managed object is considered to be an instance of the class represented by the specified runtime id. */
@unsafe
static instanceof(ref: usize, id: u32): bool { // keyword
return ref
@ -34,17 +35,7 @@ export class runtime {
/** Runtime implementation. */
export namespace runtime {
/** Adjusts an allocation to actual block size. Primarily targets TLSF. */
export function adjust(payloadSize: usize): usize {
// round up to power of 2, e.g. with HEADER_SIZE=8:
// 0 -> 2^3 = 8
// 1..8 -> 2^4 = 16
// 9..24 -> 2^5 = 32
// ...
// MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32)
return <usize>1 << <usize>(<u32>32 - clz<u32>(payloadSize + HEADER_SIZE - 1));
}
/** Allocates the memory necessary to represent a managed object of the specified size. */
// @ts-ignore: decorator
@unsafe
export function allocate(payloadSize: usize): usize {
@ -58,6 +49,7 @@ export namespace runtime {
return changetype<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 {
@ -103,6 +95,7 @@ export namespace runtime {
return ref;
}
/** Discards the memory of a managed object that hasn't been registered yet. */
// @ts-ignore: decorator
@unsafe
export function discard(ref: usize): void {
@ -116,32 +109,53 @@ export namespace runtime {
}
}
/** Registers a managed object of the kind represented by the specified runtime id. */
// @ts-ignore: decorator
@unsafe
export function register(ref: usize, classId: u32): usize {
export function register(ref: usize, id: u32): usize {
if (!ASC_NO_ASSERT) {
assert(ref > HEAP_BASE); // must be a heap object
let header = changetype<HEADER>(ref - HEADER_SIZE);
assert(header.classId == HEADER_MAGIC);
header.classId = classId;
header.classId = id;
} else {
changetype<HEADER>(ref - HEADER_SIZE).classId = classId;
changetype<HEADER>(ref - HEADER_SIZE).classId = id;
}
if (isDefined(__ref_register)) __ref_register(ref);
return ref;
}
/** Allocates and registers, but doesn't initialize the data of, a new `String` of the specified length. */
// @ts-ignore: decorator
@unsafe
export function makeArray(capacity: i32, id: u32, alignLog2: usize, source: usize = 0): usize {
export function newString(length: i32): usize {
return runtime.register(runtime.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>());
}
/** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment.*/
// @ts-ignore: decorator
@unsafe
export function newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize {
// TODO: This API isn't great, but the compiler requires it for array literals anyway,
// that is when an array literal is encountered and its data is static, this function is
// called and the static buffer provided as `data`. This function can also be used to
// create typed arrays in that `Array` also implements `ArrayBufferView` but has an
// additional `.length_` property that remains unused overhead for typed arrays.
var array = runtime.register(runtime.allocate(offsetof<i32[]>()), id);
var bufferSize = <usize>capacity << alignLog2;
var buffer = runtime.register(runtime.allocate(<usize>capacity << alignLog2), __runtime_id<ArrayBuffer>());
var bufferSize = <usize>length << alignLog2;
var buffer = runtime.register(runtime.allocate(bufferSize), __runtime_id<ArrayBuffer>());
changetype<ArrayBufferView>(array).data = changetype<ArrayBuffer>(buffer); // links
changetype<ArrayBufferView>(array).dataStart = buffer;
changetype<ArrayBufferView>(array).dataLength = bufferSize;
store<i32>(changetype<usize>(array), capacity, offsetof<i32[]>("length_"));
if (source) memory.copy(buffer, source, bufferSize);
store<i32>(changetype<usize>(array), length, offsetof<i32[]>("length_"));
if (data) memory.copy(buffer, data, bufferSize);
return array;
}
}

View File

@ -356,16 +356,16 @@ import { ArrayBufferView } from "./arraybuffer";
split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] {
assert(this !== null);
if (!limit) return changetype<String[]>(runtime.makeArray(0, __runtime_id<String[]>(), alignof<String>()));
if (!limit) return changetype<String[]>(runtime.newArray(0, alignof<String>(), __runtime_id<String[]>()));
if (separator === null) return <String[]>[this];
var length: isize = this.length;
var sepLen: isize = separator.length;
if (limit < 0) limit = i32.MAX_VALUE;
if (!sepLen) {
if (!length) return changetype<String[]>(runtime.makeArray(0, __runtime_id<String>(), alignof<String>()));
if (!length) return changetype<String[]>(runtime.newArray(0, alignof<String>(), __runtime_id<String>()));
// split by chars
length = min<isize>(length, <isize>limit);
let result = changetype<String[]>(runtime.makeArray(length, __runtime_id<String[]>(), alignof<String>()));
let result = changetype<String[]>(runtime.newArray(length, alignof<String>(), __runtime_id<String[]>()));
let resultStart = changetype<ArrayBufferView>(result).dataStart;
for (let i: isize = 0; i < length; ++i) {
let charStr = runtime.allocate(2);
@ -379,11 +379,11 @@ import { ArrayBufferView } from "./arraybuffer";
}
return result;
} else if (!length) {
let result = changetype<String[]>(runtime.makeArray(1, __runtime_id<String[]>(), alignof<String>()));
let result = changetype<String[]>(runtime.newArray(1, alignof<String>(), __runtime_id<String[]>()));
store<string>(changetype<ArrayBufferView>(result).dataStart, ""); // no need to register/link
return result;
}
var result = changetype<String[]>(runtime.makeArray(0, __runtime_id<String[]>(), alignof<String>()));
var result = changetype<String[]>(runtime.newArray(0, alignof<String>(), __runtime_id<String[]>()));
var end = 0, start = 0, i = 0;
while ((end = this.indexOf(separator!, start)) != -1) {
let len = end - start;
@ -398,7 +398,7 @@ import { ArrayBufferView } from "./arraybuffer";
start = end + sepLen;
}
if (!start) {
let result = changetype<String[]>(runtime.makeArray(1, __runtime_id<String[]>(), alignof<String>()));
let result = changetype<String[]>(runtime.newArray(1, alignof<String>(), __runtime_id<String[]>()));
unchecked(result[0] = this);
return result;
}

View File

@ -34,3 +34,14 @@ export const HEADER_MAGIC: u32 = 0xA55E4B17;
// @ts-ignore
@lazy
export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE;
/** Adjusts an allocation to actual block size. Primarily targets TLSF. */
export function adjust(payloadSize: usize): usize {
// round up to power of 2, e.g. with HEADER_SIZE=8:
// 0 -> 2^3 = 8
// 1..8 -> 2^4 = 16
// 9..24 -> 2^5 = 32
// ...
// MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32)
return <usize>1 << <usize>(<u32>32 - clz<u32>(payloadSize + HEADER_SIZE - 1));
}

View File

@ -106,7 +106,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -121,7 +121,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -18,7 +18,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -117,7 +117,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -139,7 +139,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -156,7 +156,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -1283,7 +1283,7 @@
if
i32.const 0
i32.const 88
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -1298,7 +1298,7 @@
if
i32.const 0
i32.const 88
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -55,7 +55,7 @@
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -1435,7 +1435,7 @@
(func $~lib/runtime/runtime.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -1563,7 +1563,7 @@
if
i32.const 0
i32.const 88
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -1580,7 +1580,7 @@
if
i32.const 0
i32.const 88
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -150,7 +150,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -165,7 +165,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -75,7 +75,7 @@
(func $exports/Car.getNumTires (; 4 ;) (type $FUNCSIG$i) (result i32)
global.get $exports/Car.TIRES
)
(func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -174,7 +174,7 @@
(func $~lib/runtime/runtime.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -196,7 +196,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -213,7 +213,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -49,29 +49,20 @@
(export "table" (table $0))
(export "main" (func $gc/main))
(export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof))
(export "runtime.adjust" (func $~lib/runtime/runtime.adjust))
(export "runtime.allocate" (func $~lib/runtime/runtime.allocate))
(export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate))
(export "runtime.discard" (func $~lib/runtime/runtime.discard))
(export "runtime.register" (func $~lib/runtime/runtime.register))
(export "runtime.newString" (func $~lib/runtime/runtime.newString))
(export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer))
(export ".setargc" (func $~lib/setargc))
(export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline))
(export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline))
(export "gc.implemented" (global $~lib/gc/gc.implemented))
(export "gc.collect" (func $~lib/gc/gc.collect))
(export "gc.retain" (func $~lib/gc/gc.retain))
(export "gc.release" (func $~lib/gc/gc.release))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -133,7 +124,7 @@
global.set $~lib/allocator/arena/offset
local.get $1
)
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
i32.const 1
i32.const 32
@ -160,7 +151,7 @@
i32.const 16
i32.add
)
(func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
i32.const 72
i32.const 1
local.get $0
@ -177,7 +168,7 @@
local.get $0
global.set $gc/_dummy/register_ref
)
(func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $0
i32.const 292
@ -185,7 +176,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -200,7 +191,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -212,7 +203,7 @@
call $gc/_dummy/__ref_register
local.get $0
)
(func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
block $~lib/util/memory/memset|inlined.0
local.get $1
@ -423,7 +414,7 @@
end
end
)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
i32.const 1073741808
@ -445,7 +436,7 @@
i32.const 4
call $~lib/runtime/runtime.register
)
(func $gc/_dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $gc/_dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
i32.const 200
i32.const 2
local.get $0
@ -465,7 +456,7 @@
local.get $0
global.set $gc/_dummy/link_parentRef
)
(func $gc/_dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $gc/_dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
i32.const 232
i32.const 2
local.get $0
@ -485,7 +476,7 @@
local.get $1
global.set $gc/_dummy/unlink_parentRef
)
(func $~lib/set/Set<usize>#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/set/Set<usize>#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -548,7 +539,7 @@
i32.const 0
i32.store offset=20
)
(func $~lib/set/Set<usize>#constructor (; 12 ;) (type $FUNCSIG$i) (result i32)
(func $~lib/set/Set<usize>#constructor (; 11 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
i32.const 24
call $~lib/runtime/runtime.allocate
@ -576,7 +567,7 @@
call $~lib/set/Set<usize>#clear
local.get $0
)
(func $~lib/util/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/hash/hash32 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 255
i32.and
@ -607,7 +598,7 @@
i32.const 16777619
i32.mul
)
(func $~lib/set/Set<usize>#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/set/Set<usize>#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
local.get $0
i32.load
local.get $0
@ -650,7 +641,7 @@
end
i32.const 0
)
(func $~lib/set/Set<usize>#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/set/Set<usize>#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
local.get $1
local.get $1
@ -659,7 +650,7 @@
i32.const 0
i32.ne
)
(func $~lib/set/Set<usize>#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/set/Set<usize>#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -794,7 +785,7 @@
i32.load offset=20
i32.store offset=16
)
(func $~lib/set/Set<usize>#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/set/Set<usize>#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -877,7 +868,7 @@
i32.store
end
)
(func $~lib/gc/gc.retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/gc/gc.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
global.get $~lib/gc/ROOT
local.tee $1
@ -893,7 +884,7 @@
call $gc/_dummy/__ref_link
end
)
(func $~lib/set/Set<usize>#delete (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/set/Set<usize>#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
local.get $0
local.get $1
@ -953,7 +944,7 @@
call $~lib/set/Set<usize>#rehash
end
)
(func $~lib/gc/gc.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/gc/gc.release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
global.get $~lib/gc/ROOT
local.tee $1
@ -968,7 +959,7 @@
call $gc/_dummy/__ref_unlink
end
)
(func $~lib/gc/gc.collect (; 21 ;) (type $FUNCSIG$v)
(func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v)
i32.const 272
i32.const 0
f64.const 0
@ -982,7 +973,7 @@
i32.add
global.set $gc/_dummy/collect_count
)
(func $gc/main (; 22 ;) (type $FUNCSIG$v)
(func $gc/main (; 21 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@ -1133,7 +1124,7 @@
unreachable
end
)
(func $~lib/runtime/runtime.instanceof (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.instanceof (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
if (result i32)
local.get $0
@ -1146,7 +1137,7 @@
i32.const 0
end
)
(func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@ -1993,7 +1984,7 @@
i32.store8
end
)
(func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
block $~lib/util/memory/memmove|inlined.0
@ -2187,7 +2178,7 @@
end
end
)
(func $~lib/runtime/runtime.reallocate (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.reallocate (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -2264,7 +2255,7 @@
if
i32.const 0
i32.const 24
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -2292,14 +2283,14 @@
i32.store offset=4
local.get $0
)
(func $~lib/runtime/runtime.discard (; 27 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
i32.const 292
i32.le_u
if
i32.const 0
i32.const 24
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -2313,69 +2304,83 @@
if
i32.const 0
i32.const 24
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable
end
)
(func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 1
i32.shl
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
)
(func $~lib/runtime/runtime.newArrayBuffer (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
call $~lib/runtime/runtime.allocate
i32.const 4
call $~lib/runtime/runtime.register
)
(func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
call $~lib/runtime/runtime.register
local.tee $4
local.set $5
local.get $0
local.get $2
call $~lib/runtime/runtime.register
local.tee $2
local.set $4
local.get $0
local.get $1
i32.shl
local.tee $6
local.tee $5
call $~lib/runtime/runtime.allocate
i32.const 4
call $~lib/runtime/runtime.register
local.tee $7
local.tee $6
local.tee $1
local.get $4
local.get $2
i32.load
local.tee $2
local.tee $7
i32.ne
if
local.get $2
local.get $7
if
local.get $2
local.get $5
local.get $7
local.get $4
call $gc/_dummy/__ref_unlink
end
local.get $1
local.get $5
local.get $4
call $gc/_dummy/__ref_link
end
local.get $4
local.get $2
local.get $1
i32.store
local.get $4
local.get $7
i32.store offset=4
local.get $4
local.get $2
local.get $6
i32.store offset=4
local.get $2
local.get $5
i32.store offset=8
local.get $4
local.get $2
local.get $0
i32.store offset=12
local.get $3
if
local.get $7
local.get $3
local.get $6
local.get $3
local.get $5
call $~lib/memory/memory.copy
end
local.get $4
local.get $2
)
(func $~lib/runtime/__runtime_instanceof (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/__runtime_instanceof (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
block $nope
block $~lib/arraybuffer/ArrayBuffer
block $~lib/set/Set<usize>
@ -2408,10 +2413,10 @@
end
i32.const 0
)
(func $null (; 30 ;) (type $FUNCSIG$v)
(func $null (; 31 ;) (type $FUNCSIG$v)
nop
)
(func $~lib/runtime/runtime.makeArray|trampoline (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray|trampoline (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
block $1of1
block $0of1
block $outOfRange
@ -2429,9 +2434,9 @@
local.get $1
local.get $2
local.get $3
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
)
(func $~lib/setargc (; 32 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/setargc (; 33 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
global.set $~lib/argc
)

View File

@ -48,19 +48,20 @@
(export "table" (table $0))
(export "main" (func $gc/main))
(export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof))
(export "runtime.adjust" (func $~lib/runtime/runtime.adjust))
(export "runtime.allocate" (func $~lib/runtime/runtime.allocate))
(export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate))
(export "runtime.discard" (func $~lib/runtime/runtime.discard))
(export "runtime.register" (func $~lib/runtime/runtime.register))
(export "runtime.newString" (func $~lib/runtime/runtime.newString))
(export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer))
(export ".setargc" (func $~lib/setargc))
(export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline))
(export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline))
(export "gc.implemented" (global $~lib/gc/gc.implemented))
(export "gc.collect" (func $~lib/gc/gc.collect))
(export "gc.retain" (func $~lib/gc/gc.retain))
(export "gc.release" (func $~lib/gc/gc.release))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -159,7 +160,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -204,7 +205,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -221,7 +222,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2802,10 +2803,10 @@
i32.lt_u
if
local.get $1
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
local.set $4
local.get $3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -2855,7 +2856,7 @@
if
i32.const 0
i32.const 24
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -2897,7 +2898,7 @@
if
i32.const 0
i32.const 24
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -2914,7 +2915,7 @@
if
i32.const 0
i32.const 24
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable
@ -2922,7 +2923,21 @@
local.get $1
call $~lib/memory/memory.free
)
(func $~lib/runtime/runtime.makeArray (; 33 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 1
i32.shl
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
)
(func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
call $~lib/runtime/runtime.allocate
i32.const 4
call $~lib/runtime/runtime.register
)
(func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
@ -2931,16 +2946,14 @@
(local $9 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 4
call $~lib/runtime/runtime.register
@ -2986,10 +2999,10 @@
end
local.get $4
)
(func $~lib/runtime/runtime#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/runtime#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
unreachable
)
(func $start (; 35 ;) (type $FUNCSIG$v)
(func $start (; 37 ;) (type $FUNCSIG$v)
global.get $~lib/memory/HEAP_BASE
i32.const 7
i32.add
@ -3004,7 +3017,7 @@
call $~lib/set/Set<usize>#constructor
global.set $~lib/gc/ROOT
)
(func $~lib/runtime/__runtime_instanceof (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
block $nope
block $~lib/arraybuffer/ArrayBuffer
block $~lib/set/Set<usize>
@ -3036,9 +3049,9 @@
i32.const 0
return
)
(func $null (; 37 ;) (type $FUNCSIG$v)
(func $null (; 39 ;) (type $FUNCSIG$v)
)
(func $~lib/runtime/runtime.makeArray|trampoline (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
block $1of1
block $0of1
block $outOfRange
@ -3056,9 +3069,9 @@
local.get $1
local.get $2
local.get $3
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
)
(func $~lib/setargc (; 39 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
global.set $~lib/argc
)

View File

@ -137,7 +137,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -152,7 +152,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -38,7 +38,7 @@
(export "table" (table $0))
(export "main" (func $gc/global-assign/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -137,7 +137,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -182,7 +182,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -199,7 +199,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -136,7 +136,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -151,7 +151,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -37,7 +37,7 @@
(export "table" (table $0))
(export "main" (func $gc/global-init/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -136,7 +136,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -181,7 +181,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -198,7 +198,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -341,7 +341,7 @@
if
i32.const 0
i32.const 128
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -356,7 +356,7 @@
if
i32.const 0
i32.const 128
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -1859,7 +1859,7 @@
if
i32.const 0
i32.const 128
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable

View File

@ -61,7 +61,7 @@
(export "table" (table $0))
(export "main" (func $gc/itcm/trace/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -160,7 +160,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -390,7 +390,7 @@
if
i32.const 0
i32.const 128
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -407,7 +407,7 @@
if
i32.const 0
i32.const 128
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2413,10 +2413,10 @@
i32.lt_u
if
local.get $1
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
local.set $4
local.get $3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -2466,7 +2466,7 @@
if
i32.const 0
i32.const 128
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable

View File

@ -143,7 +143,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -158,7 +158,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -36,7 +36,7 @@
(export "table" (table $0))
(export "main" (func $gc/rc/global-assign/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -135,7 +135,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -180,7 +180,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -197,7 +197,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -139,7 +139,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -154,7 +154,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -34,7 +34,7 @@
(export "table" (table $0))
(export "main" (func $gc/rc/global-init/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -133,7 +133,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -178,7 +178,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -195,7 +195,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -85,7 +85,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -100,7 +100,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -20,7 +20,7 @@
(export "table" (table $0))
(export "test" (func $getter-call/test))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -119,7 +119,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -141,7 +141,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -158,7 +158,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -131,7 +131,7 @@
if
i32.const 0
i32.const 48
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -146,7 +146,7 @@
if
i32.const 0
i32.const 48
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -284,7 +284,7 @@
unreachable
end
)
(func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -383,7 +383,7 @@
(func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -405,7 +405,7 @@
if
i32.const 0
i32.const 48
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -422,7 +422,7 @@
if
i32.const 0
i32.const 48
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -303,7 +303,7 @@
if
i32.const 0
i32.const 464
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -318,7 +318,7 @@
if
i32.const 0
i32.const 464
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2451,7 +2451,7 @@
if
i32.const 0
i32.const 464
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -2465,7 +2465,7 @@
if
i32.const 0
i32.const 464
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -135,7 +135,7 @@
unreachable
unreachable
)
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -234,7 +234,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -399,7 +399,7 @@
if
i32.const 0
i32.const 464
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -416,7 +416,7 @@
if
i32.const 0
i32.const 464
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -3534,7 +3534,7 @@
if
i32.const 0
i32.const 464
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -3551,7 +3551,7 @@
if
i32.const 0
i32.const 464
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -100,7 +100,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -115,7 +115,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -27,7 +27,7 @@
(func $optional-typeparameters/testDerived<i32,i32> (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
)
(func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -126,7 +126,7 @@
(func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -148,7 +148,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -165,7 +165,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -143,7 +143,7 @@
if
i32.const 0
i32.const 88
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -158,7 +158,7 @@
if
i32.const 0
i32.const 88
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -45,7 +45,7 @@
(export "table" (table $0))
(export "main" (func $runtime/instanceof/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -144,7 +144,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -189,7 +189,7 @@
if
i32.const 0
i32.const 88
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -206,7 +206,7 @@
if
i32.const 0
i32.const 88
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -177,7 +177,7 @@
if
i32.const 0
i32.const 296
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -192,7 +192,7 @@
if
i32.const 0
i32.const 296
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -202,40 +202,40 @@
i32.store
local.get $0
)
(func $~lib/runtime/runtime.makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $0
call $~lib/runtime/runtime.register
local.set $0
i32.const 3
local.get $1
call $~lib/runtime/runtime.register
local.set $1
i32.const 3
local.get $0
i32.shl
local.tee $1
local.tee $0
call $~lib/runtime/runtime.allocate
i32.const 1
call $~lib/runtime/runtime.register
local.tee $2
local.tee $3
local.get $0
local.get $1
i32.load
i32.ne
drop
local.get $0
local.get $1
local.get $3
i32.store
local.get $0
local.get $1
local.get $2
i32.store offset=4
local.get $0
local.get $1
i32.store offset=8
local.get $0
i32.store offset=8
local.get $1
i32.const 3
i32.store offset=12
local.get $0
local.get $1
)
(func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
@ -365,9 +365,9 @@
global.set $~lib/allocator/arena/startOffset
global.get $~lib/allocator/arena/startOffset
global.set $~lib/allocator/arena/offset
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
i32.const 2
call $~lib/runtime/runtime.newArray
local.tee $2
i32.load offset=4
local.tee $0
@ -443,9 +443,9 @@
end
i32.const 0
global.set $std/array-literal/i
i32.const 4
i32.const 2
call $~lib/runtime/runtime.makeArray
i32.const 4
call $~lib/runtime/runtime.newArray
local.tee $2
i32.load offset=4
local.tee $0
@ -519,9 +519,9 @@
call $~lib/env/abort
unreachable
end
i32.const 6
i32.const 2
call $~lib/runtime/runtime.makeArray
i32.const 6
call $~lib/runtime/runtime.newArray
local.tee $2
i32.load offset=4
local.tee $0
@ -547,9 +547,9 @@
call $~lib/env/abort
unreachable
end
i32.const 8
i32.const 2
call $~lib/runtime/runtime.makeArray
i32.const 8
call $~lib/runtime/runtime.newArray
local.tee $2
i32.load offset=4
local.tee $0

View File

@ -103,7 +103,7 @@
local.get $1
call $~lib/array/Array<i32>#__unchecked_get
)
(func $~lib/runtime/runtime.adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -202,7 +202,7 @@
(func $~lib/runtime/runtime.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -233,7 +233,7 @@
if
i32.const 0
i32.const 296
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -250,7 +250,7 @@
if
i32.const 0
i32.const 296
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -1700,7 +1700,7 @@
end
end
)
(func $~lib/runtime/runtime.makeArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
@ -1709,16 +1709,14 @@
(local $9 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 1
call $~lib/runtime/runtime.register
@ -1935,10 +1933,10 @@
global.set $~lib/allocator/arena/offset
block (result i32)
i32.const 3
i32.const 0
i32.const 2
i32.const 0
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $0
local.get $0
i32.load offset=4
@ -2028,10 +2026,10 @@
global.set $std/array-literal/i
block (result i32)
i32.const 3
i32.const 4
i32.const 2
i32.const 4
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $1
local.get $1
i32.load offset=4
@ -2119,10 +2117,10 @@
end
block (result i32)
i32.const 3
i32.const 6
i32.const 2
i32.const 6
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $0
local.get $0
i32.load offset=4
@ -2178,10 +2176,10 @@
end
block (result i32)
i32.const 3
i32.const 8
i32.const 2
i32.const 8
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $1
local.get $1
i32.load offset=4

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 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -342,7 +342,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -1535,7 +1535,7 @@
i32.store offset=8
local.get $0
)
(func $~lib/runtime/runtime.makeArray (; 10 ;) (type $FUNCSIG$i) (result i32)
(func $~lib/runtime/runtime.newArray (; 10 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(local $1 i32)
i32.const 16
@ -1830,7 +1830,7 @@
i32.const 0
call $~lib/arraybuffer/ArrayBufferView#constructor
global.set $std/arraybuffer/arr8
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
drop
global.get $std/arraybuffer/arr8
if (result i32)

View File

@ -29,7 +29,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -128,7 +128,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -407,7 +407,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -424,7 +424,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2618,22 +2618,20 @@
local.set $0
local.get $0
)
(func $~lib/runtime/runtime.makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
@ -3020,10 +3018,10 @@
call $~lib/typedarray/Uint8Array#constructor
global.set $std/arraybuffer/arr8
i32.const 2
i32.const 5
i32.const 2
i32.const 5
i32.const 152
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array<i32>>
i32.eqz
i32.eqz

View File

@ -165,7 +165,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -180,7 +180,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -35,7 +35,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -134,7 +134,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -413,7 +413,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -430,7 +430,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -89,7 +89,7 @@
if
i32.const 0
i32.const 48
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -104,7 +104,7 @@
if
i32.const 0
i32.const 48
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -27,7 +27,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -126,7 +126,7 @@
(func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -148,7 +148,7 @@
if
i32.const 0
i32.const 48
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -165,7 +165,7 @@
if
i32.const 0
i32.const 48
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -135,7 +135,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -150,7 +150,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -36,7 +36,7 @@
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -135,7 +135,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -166,7 +166,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -183,7 +183,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -84,7 +84,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -99,7 +99,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -20,7 +20,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -119,7 +119,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -141,7 +141,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -158,7 +158,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -118,7 +118,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -133,7 +133,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -23,7 +23,7 @@
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -122,7 +122,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -153,7 +153,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -170,7 +170,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -167,7 +167,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -182,7 +182,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -88,7 +88,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -187,7 +187,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -209,7 +209,7 @@
if
i32.const 0
i32.const 16
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -226,7 +226,7 @@
if
i32.const 0
i32.const 16
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -2560,7 +2560,7 @@
if
i32.const 0
i32.const 232
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -2597,7 +2597,7 @@
if
i32.const 0
i32.const 232
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -2612,7 +2612,7 @@
if
i32.const 0
i32.const 232
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable
@ -2628,7 +2628,7 @@
if
i32.const 0
i32.const 232
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -2643,7 +2643,7 @@
if
i32.const 0
i32.const 232
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2694,7 +2694,7 @@
else
i32.const 0
i32.const 24
i32.const 41
i32.const 40
i32.const 2
call $~lib/env/abort
unreachable
@ -2805,7 +2805,7 @@
if
i32.const 0
i32.const 24
i32.const 56
i32.const 55
i32.const 0
call $~lib/env/abort
unreachable
@ -2817,7 +2817,7 @@
if
i32.const 0
i32.const 24
i32.const 57
i32.const 56
i32.const 0
call $~lib/env/abort
unreachable
@ -2831,7 +2831,7 @@
if
i32.const 0
i32.const 24
i32.const 58
i32.const 57
i32.const 0
call $~lib/env/abort
unreachable
@ -2843,7 +2843,7 @@
if
i32.const 0
i32.const 24
i32.const 59
i32.const 58
i32.const 0
call $~lib/env/abort
unreachable
@ -2858,7 +2858,7 @@
if
i32.const 0
i32.const 24
i32.const 61
i32.const 60
i32.const 0
call $~lib/env/abort
unreachable
@ -2874,7 +2874,7 @@
if
i32.const 0
i32.const 24
i32.const 63
i32.const 62
i32.const 0
call $~lib/env/abort
unreachable
@ -2890,7 +2890,7 @@
if
i32.const 0
i32.const 24
i32.const 66
i32.const 65
i32.const 0
call $~lib/env/abort
unreachable
@ -2906,7 +2906,7 @@
if
i32.const 0
i32.const 24
i32.const 70
i32.const 69
i32.const 0
call $~lib/env/abort
unreachable
@ -2922,7 +2922,7 @@
if
i32.const 0
i32.const 24
i32.const 72
i32.const 71
i32.const 0
call $~lib/env/abort
unreachable
@ -2934,7 +2934,7 @@
if
i32.const 0
i32.const 24
i32.const 73
i32.const 72
i32.const 0
call $~lib/env/abort
unreachable
@ -2951,7 +2951,7 @@
if
i32.const 0
i32.const 24
i32.const 76
i32.const 75
i32.const 0
call $~lib/env/abort
unreachable
@ -2967,7 +2967,7 @@
if
i32.const 0
i32.const 24
i32.const 77
i32.const 76
i32.const 0
call $~lib/env/abort
unreachable

View File

@ -1,6 +1,5 @@
import "allocator/tlsf";
// import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime";
import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "util/runtime";
import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "util/runtime";
import { runtime, __runtime_id } from "runtime";
@start export function main(): void {}
@ -36,16 +35,16 @@ function isPowerOf2(x: i32): bool {
return x != 0 && (x & (x - 1)) == 0;
}
assert(runtime.adjust(0) > 0);
assert(adjust(0) > 0);
for (let i = 0; i < 9000; ++i) {
assert(isPowerOf2(runtime.adjust(i)));
assert(isPowerOf2(adjust(i)));
}
var barrier1 = runtime.adjust(0);
var barrier1 = adjust(0);
var barrier2 = barrier1 + 1;
while (runtime.adjust(barrier2 + 1) == runtime.adjust(barrier2)) ++barrier2;
while (adjust(barrier2 + 1) == adjust(barrier2)) ++barrier2;
var barrier3 = barrier2 + 1;
while (runtime.adjust(barrier3 + 1) == runtime.adjust(barrier3)) ++barrier3;
while (adjust(barrier3 + 1) == adjust(barrier3)) ++barrier3;
trace("barrier1", 1, barrier1);
trace("barrier2", 1, barrier2);

View File

@ -60,7 +60,7 @@
(export "table" (table $0))
(export "main" (func $std/runtime/main))
(export ".capabilities" (global $~lib/capabilities))
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -1458,7 +1458,7 @@
(func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -3235,10 +3235,10 @@
i32.lt_u
if
local.get $1
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
local.set $4
local.get $3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -3288,7 +3288,7 @@
if
i32.const 0
i32.const 232
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -3330,7 +3330,7 @@
if
i32.const 0
i32.const 232
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -3347,7 +3347,7 @@
if
i32.const 0
i32.const 232
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable
@ -3364,7 +3364,7 @@
if
i32.const 0
i32.const 232
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -3381,7 +3381,7 @@
if
i32.const 0
i32.const 232
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -3416,20 +3416,20 @@
if
i32.const 0
i32.const 24
i32.const 33
i32.const 32
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
i32.gt_u
i32.eqz
if
i32.const 0
i32.const 24
i32.const 39
i32.const 38
i32.const 0
call $~lib/env/abort
unreachable
@ -3444,13 +3444,13 @@
i32.eqz
br_if $break|0
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $std/runtime/isPowerOf2
i32.eqz
if
i32.const 0
i32.const 24
i32.const 41
i32.const 40
i32.const 2
call $~lib/env/abort
unreachable
@ -3465,7 +3465,7 @@
unreachable
end
i32.const 0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
global.set $std/runtime/barrier1
global.get $std/runtime/barrier1
i32.const 1
@ -3476,9 +3476,9 @@
global.get $std/runtime/barrier2
i32.const 1
i32.add
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
global.get $std/runtime/barrier2
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.eq
if
global.get $std/runtime/barrier2
@ -3498,9 +3498,9 @@
global.get $std/runtime/barrier3
i32.const 1
i32.add
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
global.get $std/runtime/barrier3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.eq
if
global.get $std/runtime/barrier3
@ -3553,7 +3553,7 @@
if
i32.const 0
i32.const 24
i32.const 56
i32.const 55
i32.const 0
call $~lib/env/abort
unreachable
@ -3566,7 +3566,7 @@
if
i32.const 0
i32.const 24
i32.const 57
i32.const 56
i32.const 0
call $~lib/env/abort
unreachable
@ -3580,7 +3580,7 @@
if
i32.const 0
i32.const 24
i32.const 58
i32.const 57
i32.const 0
call $~lib/env/abort
unreachable
@ -3593,7 +3593,7 @@
if
i32.const 0
i32.const 24
i32.const 59
i32.const 58
i32.const 0
call $~lib/env/abort
unreachable
@ -3609,7 +3609,7 @@
if
i32.const 0
i32.const 24
i32.const 61
i32.const 60
i32.const 0
call $~lib/env/abort
unreachable
@ -3626,7 +3626,7 @@
if
i32.const 0
i32.const 24
i32.const 63
i32.const 62
i32.const 0
call $~lib/env/abort
unreachable
@ -3643,7 +3643,7 @@
if
i32.const 0
i32.const 24
i32.const 66
i32.const 65
i32.const 0
call $~lib/env/abort
unreachable
@ -3662,7 +3662,7 @@
if
i32.const 0
i32.const 24
i32.const 70
i32.const 69
i32.const 0
call $~lib/env/abort
unreachable
@ -3679,7 +3679,7 @@
if
i32.const 0
i32.const 24
i32.const 72
i32.const 71
i32.const 0
call $~lib/env/abort
unreachable
@ -3692,7 +3692,7 @@
if
i32.const 0
i32.const 24
i32.const 73
i32.const 72
i32.const 0
call $~lib/env/abort
unreachable
@ -3708,7 +3708,7 @@
if
i32.const 0
i32.const 24
i32.const 76
i32.const 75
i32.const 0
call $~lib/env/abort
unreachable
@ -3721,7 +3721,7 @@
if
i32.const 0
i32.const 24
i32.const 77
i32.const 76
i32.const 0
call $~lib/env/abort
unreachable

View File

@ -131,7 +131,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -146,7 +146,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -36,7 +36,7 @@
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -135,7 +135,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -166,7 +166,7 @@
if
i32.const 0
i32.const 24
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -183,7 +183,7 @@
if
i32.const 0
i32.const 24
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -1437,7 +1437,7 @@
if
i32.const 0
i32.const 280
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable

View File

@ -71,7 +71,7 @@
local.get $1
call $~lib/array/Array<i32>#__unchecked_get
)
(func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -1881,10 +1881,10 @@
i32.lt_u
if
local.get $1
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
local.set $4
local.get $3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -1928,7 +1928,7 @@
if
i32.const 0
i32.const 280
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable

View File

@ -1464,7 +1464,7 @@
if
i32.const 0
i32.const 136
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -1479,7 +1479,7 @@
if
i32.const 0
i32.const 136
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -453,7 +453,7 @@
i32.store8
local.get $1
)
(func $~lib/runtime/runtime.adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -468,7 +468,7 @@
(func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -1929,7 +1929,7 @@
if
i32.const 0
i32.const 136
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -1946,7 +1946,7 @@
if
i32.const 0
i32.const 136
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -444,7 +444,7 @@
if
i32.const 0
i32.const 184
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -459,7 +459,7 @@
if
i32.const 0
i32.const 184
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2912,7 +2912,7 @@
i32.const 1
call $~lib/runtime/runtime.register
)
(func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3235,7 +3235,7 @@
if
i32.const 0
i32.const 184
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -3363,7 +3363,7 @@
if
i32.const 0
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
return
end
local.get $1
@ -3371,7 +3371,7 @@
if
i32.const 1
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.tee $1
i32.load offset=4
local.get $0
@ -3406,7 +3406,7 @@
if
i32.const 1
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.tee $0
i32.load offset=4
i32.const 120
@ -3420,7 +3420,7 @@
if
i32.const 0
i32.const 1
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
return
end
local.get $3
@ -3431,7 +3431,7 @@
select
local.tee $4
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.tee $3
i32.load offset=4
local.set $5
@ -3475,7 +3475,7 @@
end
i32.const 0
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $2
loop $continue|1
local.get $1
@ -3543,7 +3543,7 @@
if
i32.const 1
i32.const 2
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.tee $1
i32.load offset=4
local.tee $2
@ -5177,7 +5177,7 @@
if
i32.const 0
i32.const 184
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -5191,7 +5191,7 @@
if
i32.const 0
i32.const 184
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -249,7 +249,7 @@
i32.eqz
end
)
(func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -348,7 +348,7 @@
(func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -379,7 +379,7 @@
if
i32.const 0
i32.const 184
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -396,7 +396,7 @@
if
i32.const 0
i32.const 184
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -3451,7 +3451,7 @@
(func $~lib/collector/dummy/__ref_unlink (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
nop
)
(func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
@ -3460,16 +3460,14 @@
(local $9 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 3
call $~lib/runtime/runtime.register
@ -3797,10 +3795,10 @@
i32.lt_u
if
local.get $1
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
local.set $4
local.get $3
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
i32.const 0
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -3850,7 +3848,7 @@
if
i32.const 0
i32.const 184
i32.const 85
i32.const 77
i32.const 10
call $~lib/env/abort
unreachable
@ -4071,7 +4069,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
return
end
local.get $1
@ -4083,7 +4081,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $3
local.get $3
i32.load offset=4
@ -4122,10 +4120,10 @@
i32.eqz
if
i32.const 0
i32.const 1
i32.const 2
i32.const 1
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
return
end
local.get $6
@ -4141,7 +4139,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $4
local.get $4
i32.load offset=4
@ -4201,7 +4199,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $3
local.get $3
i32.load offset=4
@ -4215,7 +4213,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $9
i32.const 0
local.set $10
@ -4301,7 +4299,7 @@
i32.const 2
i32.const 2
i32.const 0
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
local.set $3
local.get $3
i32.const 0
@ -6549,7 +6547,7 @@
if
i32.const 0
i32.const 184
i32.const 110
i32.const 103
i32.const 6
call $~lib/env/abort
unreachable
@ -6566,7 +6564,7 @@
if
i32.const 0
i32.const 184
i32.const 112
i32.const 105
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -144,7 +144,7 @@
if
i32.const 0
i32.const 72
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -159,7 +159,7 @@
if
i32.const 0
i32.const 72
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -79,7 +79,7 @@
end
local.get $2
)
(func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -178,7 +178,7 @@
(func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -200,7 +200,7 @@
if
i32.const 0
i32.const 72
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -217,7 +217,7 @@
if
i32.const 0
i32.const 72
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable

View File

@ -439,7 +439,7 @@
if
i32.const 0
i32.const 136
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -454,7 +454,7 @@
if
i32.const 0
i32.const 136
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2984,46 +2984,46 @@
end
end
)
(func $~lib/runtime/runtime.makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
call $~lib/runtime/runtime.register
local.set $1
local.get $0
local.get $2
call $~lib/runtime/runtime.register
local.set $2
local.get $0
local.get $1
i32.shl
local.tee $4
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
local.tee $2
local.tee $1
local.set $5
local.get $1
local.get $2
i32.load
drop
local.get $1
local.get $2
local.get $5
i32.store
local.get $1
local.get $2
i32.store offset=4
local.get $1
i32.store offset=4
local.get $2
local.get $4
i32.store offset=8
local.get $1
local.get $2
local.get $0
i32.store offset=12
local.get $3
if
local.get $2
local.get $1
local.get $3
local.get $4
call $~lib/memory/memory.copy
end
local.get $1
local.get $2
)
(func $~lib/typedarray/Int8Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
@ -12929,10 +12929,10 @@
call $~lib/typedarray/Int8Array#fill
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 240
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -12950,10 +12950,10 @@
call $~lib/typedarray/Int8Array#fill
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 312
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -12971,10 +12971,10 @@
call $~lib/typedarray/Int8Array#fill
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 336
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -12992,10 +12992,10 @@
call $~lib/typedarray/Int8Array#fill
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 360
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -13013,10 +13013,10 @@
call $~lib/typedarray/Int8Array#fill
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 384
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -13079,10 +13079,10 @@
end
global.get $std/typedarray/sub8
i32.const 3
i32.const 15
i32.const 0
i32.const 15
i32.const 408
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -13095,10 +13095,10 @@
end
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 432
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -13139,10 +13139,10 @@
call $~lib/typedarray/Int32Array#fill
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 456
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13160,10 +13160,10 @@
call $~lib/typedarray/Int32Array#fill
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 496
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13181,10 +13181,10 @@
call $~lib/typedarray/Int32Array#fill
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 536
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13202,10 +13202,10 @@
call $~lib/typedarray/Int32Array#fill
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 576
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13223,10 +13223,10 @@
call $~lib/typedarray/Int32Array#fill
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 616
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13291,10 +13291,10 @@
end
global.get $std/typedarray/sub32
i32.const 3
i32.const 16
i32.const 2
i32.const 16
i32.const 656
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -13307,10 +13307,10 @@
end
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 688
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if

View File

@ -110,7 +110,7 @@
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -209,7 +209,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -497,7 +497,7 @@
if
i32.const 0
i32.const 136
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -514,7 +514,7 @@
if
i32.const 0
i32.const 136
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -3869,7 +3869,7 @@
end
end
)
(func $~lib/runtime/runtime.makeArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
@ -3878,16 +3878,14 @@
(local $9 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
@ -18752,10 +18750,10 @@
drop
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 240
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18774,10 +18772,10 @@
drop
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 312
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18796,10 +18794,10 @@
drop
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 336
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18818,10 +18816,10 @@
drop
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 360
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18840,10 +18838,10 @@
drop
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 384
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18906,10 +18904,10 @@
end
global.get $std/typedarray/sub8
i32.const 3
i32.const 15
i32.const 0
i32.const 15
i32.const 408
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18922,10 +18920,10 @@
end
global.get $std/typedarray/arr8
i32.const 5
i32.const 15
i32.const 0
i32.const 15
i32.const 432
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt8ArrayEqual
i32.eqz
if
@ -18968,10 +18966,10 @@
drop
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 456
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -18990,10 +18988,10 @@
drop
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 496
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -19012,10 +19010,10 @@
drop
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 536
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -19034,10 +19032,10 @@
drop
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 576
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -19056,10 +19054,10 @@
drop
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 616
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -19126,10 +19124,10 @@
end
global.get $std/typedarray/sub32
i32.const 3
i32.const 16
i32.const 2
i32.const 16
i32.const 656
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if
@ -19142,10 +19140,10 @@
end
global.get $std/typedarray/arr32
i32.const 5
i32.const 16
i32.const 2
i32.const 16
i32.const 688
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $std/typedarray/isInt32ArrayEqual
i32.eqz
if