mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-05-01 09:52:19 +00:00
more general gc hooks?
This commit is contained in:
parent
658a380786
commit
3fc9f550ad
@ -4287,13 +4287,12 @@ export function compileBuiltinArraySetWithValue(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle Array<Ref>: value = LINK<T, TArray>(value, this)
|
// handle Array<Ref>: value = RETAIN<T, TArray>(value, this)
|
||||||
if (isManaged) {
|
if (isManaged) {
|
||||||
let program = compiler.program;
|
let program = compiler.program;
|
||||||
let linkPrototype = assert(program.linkPrototype);
|
let retainInstance = compiler.resolver.resolveFunction(assert(program.retainPrototype), [ type, target.type ]);
|
||||||
let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]);
|
if (!retainInstance) return module.createUnreachable();
|
||||||
if (!linkInstance) return module.createUnreachable();
|
valueExpr = compiler.makeCallInlinePrechecked(retainInstance, [
|
||||||
valueExpr = compiler.makeCallInlinePrechecked(linkInstance, [
|
|
||||||
valueExpr,
|
valueExpr,
|
||||||
module.createGetLocal(assert(tempThis).index, nativeSizeType)
|
module.createGetLocal(assert(tempThis).index, nativeSizeType)
|
||||||
], 0, true);
|
], 0, true);
|
||||||
|
@ -187,7 +187,8 @@ export namespace LibrarySymbols {
|
|||||||
export const REALLOCATE = "REALLOCATE";
|
export const REALLOCATE = "REALLOCATE";
|
||||||
export const DISCARD = "DISCARD";
|
export const DISCARD = "DISCARD";
|
||||||
export const REGISTER = "REGISTER";
|
export const REGISTER = "REGISTER";
|
||||||
export const LINK = "LINK";
|
export const RETAIN = "RETAIN";
|
||||||
|
export const RELEASE = "RELEASE";
|
||||||
export const WRAPARRAY = "WRAPARRAY";
|
export const WRAPARRAY = "WRAPARRAY";
|
||||||
// other
|
// other
|
||||||
export const length = "length";
|
export const length = "length";
|
||||||
|
@ -4870,16 +4870,16 @@ export class Compiler extends DiagnosticEmitter {
|
|||||||
let program = this.program;
|
let program = this.program;
|
||||||
let tempThis: Local | null = null;
|
let tempThis: Local | null = null;
|
||||||
if (type.isManaged(program) && thisType.isManaged(program)) {
|
if (type.isManaged(program) && thisType.isManaged(program)) {
|
||||||
let linkInstance = this.resolver.resolveFunction(assert(program.linkPrototype), [ type, thisType ]);
|
let retainInstance = this.resolver.resolveFunction(assert(program.retainPrototype), [ type, thisType ]);
|
||||||
if (!linkInstance) {
|
if (!retainInstance) {
|
||||||
this.currentType = tee ? type : Type.void;
|
this.currentType = tee ? type : Type.void;
|
||||||
return module.createUnreachable();
|
return module.createUnreachable();
|
||||||
}
|
}
|
||||||
tempThis = this.currentFlow.getTempLocal(thisType, false);
|
tempThis = this.currentFlow.getTempLocal(thisType, false);
|
||||||
// this = (tempThis = this)
|
// this = (tempThis = this)
|
||||||
thisExpr = module.createTeeLocal(tempThis.index, thisExpr);
|
thisExpr = module.createTeeLocal(tempThis.index, thisExpr);
|
||||||
// value = LINK(value, tempThis)
|
// value = RETAIN(value, tempThis)
|
||||||
valueWithCorrectType = this.makeCallInlinePrechecked(linkInstance, [
|
valueWithCorrectType = this.makeCallInlinePrechecked(retainInstance, [
|
||||||
valueWithCorrectType,
|
valueWithCorrectType,
|
||||||
module.createGetLocal(tempThis.index, this.options.nativeSizeType)
|
module.createGetLocal(tempThis.index, this.options.nativeSizeType)
|
||||||
], 0, true);
|
], 0, true);
|
||||||
@ -6795,8 +6795,8 @@ export class Compiler extends DiagnosticEmitter {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
var isManaged = elementType.isManaged(program) && arrayType.isManaged(program);
|
var isManaged = elementType.isManaged(program) && arrayType.isManaged(program);
|
||||||
var linkInstance = isManaged
|
var retainInstance = isManaged
|
||||||
? this.resolver.resolveFunction(assert(program.linkPrototype), [ elementType, arrayType ])
|
? this.resolver.resolveFunction(assert(program.retainPrototype), [ elementType, arrayType ])
|
||||||
: null;
|
: null;
|
||||||
for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) {
|
for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) {
|
||||||
let valueExpression = expressions[i];
|
let valueExpression = expressions[i];
|
||||||
@ -6804,11 +6804,11 @@ export class Compiler extends DiagnosticEmitter {
|
|||||||
? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE)
|
? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE)
|
||||||
: elementType.toNativeZero(module);
|
: elementType.toNativeZero(module);
|
||||||
if (isManaged) {
|
if (isManaged) {
|
||||||
if (!linkInstance) {
|
if (!retainInstance) {
|
||||||
valueExpr = module.createUnreachable();
|
valueExpr = module.createUnreachable();
|
||||||
} else {
|
} else {
|
||||||
// value = LINK(value, tempThis)
|
// value = RETAIN(value, tempThis)
|
||||||
valueExpr = this.makeCallInlinePrechecked(linkInstance, [
|
valueExpr = this.makeCallInlinePrechecked(retainInstance, [
|
||||||
valueExpr,
|
valueExpr,
|
||||||
module.createGetLocal(tempThis.index, nativeArrayType)
|
module.createGetLocal(tempThis.index, nativeArrayType)
|
||||||
], 0, true);
|
], 0, true);
|
||||||
|
@ -364,8 +364,10 @@ export class Program extends DiagnosticEmitter {
|
|||||||
discardInstance: Function | null = null;
|
discardInstance: Function | null = null;
|
||||||
/** Runtime register function. */
|
/** Runtime register function. */
|
||||||
registerPrototype: FunctionPrototype | null = null;
|
registerPrototype: FunctionPrototype | null = null;
|
||||||
/** Runtime link function. */
|
/** Runtime retain function. */
|
||||||
linkPrototype: FunctionPrototype | null = null;
|
retainPrototype: FunctionPrototype | null = null;
|
||||||
|
/** Runtime release function. */
|
||||||
|
releasePrototype: FunctionPrototype | null = null;
|
||||||
/** Runtime wrap array function. */
|
/** Runtime wrap array function. */
|
||||||
wrapArrayPrototype: FunctionPrototype | null = null;
|
wrapArrayPrototype: FunctionPrototype | null = null;
|
||||||
|
|
||||||
@ -828,9 +830,13 @@ export class Program extends DiagnosticEmitter {
|
|||||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||||
this.registerPrototype = <FunctionPrototype>element;
|
this.registerPrototype = <FunctionPrototype>element;
|
||||||
}
|
}
|
||||||
if (element = this.lookupGlobal(LibrarySymbols.LINK)) {
|
if (element = this.lookupGlobal(LibrarySymbols.RETAIN)) {
|
||||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||||
this.linkPrototype = <FunctionPrototype>element;
|
this.retainPrototype = <FunctionPrototype>element;
|
||||||
|
}
|
||||||
|
if (element = this.lookupGlobal(LibrarySymbols.RELEASE)) {
|
||||||
|
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||||
|
this.releasePrototype = <FunctionPrototype>element;
|
||||||
}
|
}
|
||||||
if (element = this.lookupGlobal(LibrarySymbols.WRAPARRAY)) {
|
if (element = this.lookupGlobal(LibrarySymbols.WRAPARRAY)) {
|
||||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ALLOCATE, REALLOCATE, DISCARD, LINK, REGISTER, MAX_BYTELENGTH, ArrayBufferView, UNLINK } from "./runtime";
|
import { ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, ArrayBufferView } from "./runtime";
|
||||||
import { ArrayBuffer } from "./arraybuffer";
|
import { ArrayBuffer } from "./arraybuffer";
|
||||||
import { COMPARATOR, SORT } from "./util/sort";
|
import { COMPARATOR, SORT } from "./util/sort";
|
||||||
import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number";
|
import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number";
|
||||||
@ -76,8 +76,8 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
if (isManaged<T>()) {
|
if (isManaged<T>()) {
|
||||||
let offset = this.dataStart + (<usize>index << alignof<T>());
|
let offset = this.dataStart + (<usize>index << alignof<T>());
|
||||||
let oldValue = load<T>(offset);
|
let oldValue = load<T>(offset);
|
||||||
store<T>(offset, LINK<T,this>(value, this));
|
store<T>(offset, RETAIN<T,this>(value, this));
|
||||||
UNLINK<T,this>(oldValue, this); // order is important
|
RELEASE<T,this>(oldValue, this); // order is important
|
||||||
} else {
|
} else {
|
||||||
store<T>(this.dataStart + (<usize>index << alignof<T>()), value);
|
store<T>(this.dataStart + (<usize>index << alignof<T>()), value);
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
this.length_ = newLength;
|
this.length_ = newLength;
|
||||||
store<T>(this.dataStart + (<usize>(newLength - 1) << alignof<T>()),
|
store<T>(this.dataStart + (<usize>(newLength - 1) << alignof<T>()),
|
||||||
isManaged<T>()
|
isManaged<T>()
|
||||||
? LINK<T,this>(element, this)
|
? RETAIN<T,this>(element, this)
|
||||||
: element
|
: element
|
||||||
);
|
);
|
||||||
return newLength;
|
return newLength;
|
||||||
@ -156,13 +156,13 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
let thisStart = this.dataStart;
|
let thisStart = this.dataStart;
|
||||||
for (let offset: usize = 0; offset < thisSize; offset += sizeof<T>()) {
|
for (let offset: usize = 0; offset < thisSize; offset += sizeof<T>()) {
|
||||||
let element = load<T>(thisStart + offset);
|
let element = load<T>(thisStart + offset);
|
||||||
store<T>(outStart + offset, LINK<T,Array<T>>(element, out));
|
store<T>(outStart + offset, RETAIN<T,Array<T>>(element, out));
|
||||||
}
|
}
|
||||||
let otherStart = other.dataStart;
|
let otherStart = other.dataStart;
|
||||||
let otherSize = <usize>otherLen << alignof<T>();
|
let otherSize = <usize>otherLen << alignof<T>();
|
||||||
for (let offset: usize = 0; offset < otherSize; offset += sizeof<T>()) {
|
for (let offset: usize = 0; offset < otherSize; offset += sizeof<T>()) {
|
||||||
let element = load<T>(otherStart + offset);
|
let element = load<T>(otherStart + offset);
|
||||||
store<T>(outStart + thisSize + offset, LINK<T,Array<T>>(element, out));
|
store<T>(outStart + thisSize + offset, RETAIN<T,Array<T>>(element, out));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
memory.copy(outStart, this.dataStart, thisSize);
|
memory.copy(outStart, this.dataStart, thisSize);
|
||||||
@ -221,7 +221,7 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
let result = callbackfn(value, index, this);
|
let result = callbackfn(value, index, this);
|
||||||
store<U>(outStart + (<usize>index << alignof<U>()),
|
store<U>(outStart + (<usize>index << alignof<U>()),
|
||||||
isManaged<U>()
|
isManaged<U>()
|
||||||
? LINK<U,Array<U>>(result, out)
|
? RETAIN<U,Array<U>>(result, out)
|
||||||
: result
|
: result
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
);
|
);
|
||||||
store<T>(base,
|
store<T>(base,
|
||||||
isManaged<T>()
|
isManaged<T>()
|
||||||
? LINK<T,this>(element, this)
|
? RETAIN<T,this>(element, this)
|
||||||
: element
|
: element
|
||||||
);
|
);
|
||||||
this.length_ = newLength;
|
this.length_ = newLength;
|
||||||
@ -316,7 +316,7 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
let element = load<T>(thisBase + offset);
|
let element = load<T>(thisBase + offset);
|
||||||
store<T>(sliceBase + offset,
|
store<T>(sliceBase + offset,
|
||||||
isManaged<T>()
|
isManaged<T>()
|
||||||
? LINK<T,Array<T>>(element, slice)
|
? RETAIN<T,Array<T>>(element, slice)
|
||||||
: element
|
: element
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -334,8 +334,8 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
for (let i = 0; i < deleteCount; ++i) {
|
for (let i = 0; i < deleteCount; ++i) {
|
||||||
let deleted = load<T>(thisBase + (<usize>i << alignof<T>()));
|
let deleted = load<T>(thisBase + (<usize>i << alignof<T>()));
|
||||||
if (isManaged<T>()) {
|
if (isManaged<T>()) {
|
||||||
store<T>(resultStart + (<usize>i << alignof<T>()), LINK<T,Array<T>>(deleted, result));
|
store<T>(resultStart + (<usize>i << alignof<T>()), RETAIN<T,Array<T>>(deleted, result));
|
||||||
UNLINK<T,this>(deleted, this); // order is important
|
RELEASE<T,this>(deleted, this); // order is important
|
||||||
} else {
|
} else {
|
||||||
store<T>(resultStart + (<usize>i << alignof<T>()), deleted);
|
store<T>(resultStart + (<usize>i << alignof<T>()), deleted);
|
||||||
}
|
}
|
||||||
@ -655,16 +655,17 @@ export class Array<T> extends ArrayBufferView {
|
|||||||
return this.join();
|
return this.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private __gc(): void {
|
// GC integration
|
||||||
// var buffer = this.buffer_;
|
|
||||||
// __gc_mark(changetype<usize>(buffer)); // tslint:disable-line
|
@unsafe private __iter(fn: (ref: usize) => void): void {
|
||||||
// if (isManaged<T>()) {
|
fn(changetype<usize>(this.data));
|
||||||
// let offset: usize = 0;
|
if (isManaged<T>()) {
|
||||||
// let end = <usize>this.length_ << alignof<usize>();
|
let cur = this.dataStart;
|
||||||
// while (offset < end) {
|
let end = cur + <usize>this.dataLength;
|
||||||
// __gc_mark(load<usize>(changetype<usize>(buffer) + offset, HEADER_SIZE)); // tslint:disable-line
|
while (cur < end) {
|
||||||
// offset += sizeof<usize>();
|
fn(load<usize>(cur));
|
||||||
// }
|
cur += sizeof<usize>();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// A Pure Reference Counting Garbage Collector
|
// A Pure Reference Counting Garbage Collector
|
||||||
//
|
//
|
||||||
// After the paper by DAVID F. BACON, CLEMENT R. ATTANASIO, V.T. RAJAN, STEPHEN E. SMITH
|
// After the paper by D. Bacon et al., 2001, IBM T.J. Watson Research Center
|
||||||
// D. Bacon, IBM T.J. Watson Research Center
|
// https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf
|
||||||
// 2001 ACM 0164-0925/99/0100-0111 $00.75
|
|
||||||
|
|
||||||
import { HEADER, HEADER_SIZE } from "../runtime";
|
import { HEADER, HEADER_SIZE } from "../runtime";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, LINK, UNLINK } from "./runtime";
|
import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, RETAIN, RELEASE } from "./runtime";
|
||||||
|
|
||||||
// NOTE: DO NOT USE YET!
|
// NOTE: DO NOT USE YET!
|
||||||
|
|
||||||
@ -38,10 +38,23 @@ export class FixedArray<T> {
|
|||||||
if (isManaged<T>()) {
|
if (isManaged<T>()) {
|
||||||
let offset = changetype<usize>(this) + (<usize>index << alignof<T>());
|
let offset = changetype<usize>(this) + (<usize>index << alignof<T>());
|
||||||
let oldValue = load<T>(offset);
|
let oldValue = load<T>(offset);
|
||||||
store<T>(offset, LINK<T,this>(value, this));
|
store<T>(offset, RETAIN<T,this>(value, this));
|
||||||
UNLINK<T,this>(oldValue, this); // order is important
|
RELEASE<T,this>(oldValue, this); // order is important
|
||||||
} else {
|
} else {
|
||||||
store<T>(changetype<usize>(this) + (<usize>index << alignof<T>()), value);
|
store<T>(changetype<usize>(this) + (<usize>index << alignof<T>()), value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GC integration
|
||||||
|
|
||||||
|
@unsafe private __iter(fn: (ref: usize) => void): void {
|
||||||
|
if (isManaged<T>()) {
|
||||||
|
let cur = changetype<usize>(this);
|
||||||
|
let end = cur + changetype<HEADER>(changetype<usize>(this) - HEADER_SIZE).payloadSize;
|
||||||
|
while (cur < end) {
|
||||||
|
fn(load<usize>(cur));
|
||||||
|
cur += sizeof<usize>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { LINK, UNLINK } from "./runtime";
|
import { RETAIN, RELEASE, HEADER } from "./runtime";
|
||||||
import { HASH } from "./util/hash";
|
import { HASH } from "./util/hash";
|
||||||
|
|
||||||
// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht
|
// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht
|
||||||
@ -106,8 +106,8 @@ export class Map<K,V> {
|
|||||||
if (entry) {
|
if (entry) {
|
||||||
if (isManaged<V>()) {
|
if (isManaged<V>()) {
|
||||||
let oldValue = entry.value;
|
let oldValue = entry.value;
|
||||||
entry.value = LINK<V,this>(value, this);
|
entry.value = RETAIN<V,this>(value, this);
|
||||||
UNLINK<V,this>(oldValue, this); // order is important
|
RELEASE<V,this>(oldValue, this); // order is important
|
||||||
} else {
|
} else {
|
||||||
entry.value = value;
|
entry.value = value;
|
||||||
}
|
}
|
||||||
@ -126,8 +126,8 @@ export class Map<K,V> {
|
|||||||
changetype<usize>(entries) + this.entriesOffset++ * ENTRY_SIZE<K,V>()
|
changetype<usize>(entries) + this.entriesOffset++ * ENTRY_SIZE<K,V>()
|
||||||
);
|
);
|
||||||
// link with the map
|
// link with the map
|
||||||
entry.key = isManaged<K>() ? LINK<K,this>(key, this) : key;
|
entry.key = isManaged<K>() ? RETAIN<K,this>(key, this) : key;
|
||||||
entry.value = isManaged<V>() ? LINK<V,this>(value, this) : value;
|
entry.value = isManaged<V>() ? RETAIN<V,this>(value, this) : value;
|
||||||
++this.entriesCount;
|
++this.entriesCount;
|
||||||
// link with previous entry in bucket
|
// link with previous entry in bucket
|
||||||
let bucketPtrBase = changetype<usize>(this.buckets) + <usize>(hashCode & this.bucketsMask) * BUCKET_SIZE;
|
let bucketPtrBase = changetype<usize>(this.buckets) + <usize>(hashCode & this.bucketsMask) * BUCKET_SIZE;
|
||||||
@ -139,8 +139,8 @@ export class Map<K,V> {
|
|||||||
delete(key: K): bool {
|
delete(key: K): bool {
|
||||||
var entry = this.find(key, HASH<K>(key));
|
var entry = this.find(key, HASH<K>(key));
|
||||||
if (!entry) return false;
|
if (!entry) return false;
|
||||||
if (isManaged<K>()) UNLINK<K,this>(entry.key, this);
|
if (isManaged<K>()) RELEASE<K,this>(entry.key, this);
|
||||||
if (isManaged<V>()) UNLINK<V,this>(entry.value, this);
|
if (isManaged<V>()) RELEASE<V,this>(entry.value, this);
|
||||||
entry.taggedNext |= EMPTY;
|
entry.taggedNext |= EMPTY;
|
||||||
--this.entriesCount;
|
--this.entriesCount;
|
||||||
// check if rehashing is appropriate
|
// check if rehashing is appropriate
|
||||||
@ -188,23 +188,23 @@ export class Map<K,V> {
|
|||||||
return "[object Map]";
|
return "[object Map]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// private __gc(): void {
|
// GC integration
|
||||||
// __gc_mark(changetype<usize>(this.buckets)); // tslint:disable-line
|
|
||||||
// var entries = this.entries;
|
@unsafe private __iter(fn: (ref: usize) => void): void {
|
||||||
// __gc_mark(changetype<usize>(entries)); // tslint:disable-line
|
fn(changetype<usize>(this.buckets));
|
||||||
// if (isManaged<K>() || isManaged<V>()) {
|
var entries = this.entries;
|
||||||
// let offset: usize = 0;
|
fn(changetype<usize>(entries));
|
||||||
// let end: usize = this.entriesOffset * ENTRY_SIZE<K,V>();
|
if (isManaged<K>() || isManaged<V>()) {
|
||||||
// while (offset < end) {
|
let cur = changetype<usize>(entries);
|
||||||
// let entry = changetype<MapEntry<K,V>>(
|
let end = cur + <usize>this.entriesOffset * ENTRY_SIZE<K,V>();
|
||||||
// changetype<usize>(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE<K,V>()
|
while (cur < end) {
|
||||||
// );
|
let entry = changetype<MapEntry<K,V>>(cur);
|
||||||
// if (!(entry.taggedNext & EMPTY)) {
|
if (!(entry.taggedNext & EMPTY)) {
|
||||||
// if (isManaged<K>()) __gc_mark(changetype<usize>(entry.key)); // tslint:disable-line
|
if (isManaged<K>()) fn(changetype<usize>(entry.key));
|
||||||
// if (isManaged<V>()) __gc_mark(changetype<usize>(entry.value)); // tslint:disable-line
|
if (isManaged<V>()) fn(changetype<usize>(entry.value));
|
||||||
// }
|
}
|
||||||
// offset += ENTRY_SIZE<K,V>();
|
cur += ENTRY_SIZE<K,V>();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,17 +141,17 @@ function doRegister(ref: usize, classId: u32): usize {
|
|||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Links a registered object with an object that is now referencing it. */
|
/** Retains a registered object. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @inline
|
@unsafe @inline
|
||||||
export function LINK<T,TParent>(ref: T, parentRef: TParent): T {
|
export function RETAIN<T,TParent>(ref: T, parentRef: TParent): T {
|
||||||
if (!isManaged<T>()) ERROR("managed reference expected");
|
if (!isManaged<T>()) ERROR("managed reference expected");
|
||||||
if (!isManaged<TParent>()) ERROR("managed reference expected");
|
if (!isManaged<TParent>()) ERROR("managed reference expected");
|
||||||
doLink(changetype<usize>(ref), changetype<usize>(parentRef));
|
doRetain(changetype<usize>(ref), changetype<usize>(parentRef));
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
function doLink(ref: usize, parentRef: usize): void {
|
function doRetain(ref: usize, parentRef: usize): void {
|
||||||
if (!ASC_NO_ASSERT) {
|
if (!ASC_NO_ASSERT) {
|
||||||
assertRegistered(ref);
|
assertRegistered(ref);
|
||||||
assertRegistered(parentRef);
|
assertRegistered(parentRef);
|
||||||
@ -160,16 +160,16 @@ function doLink(ref: usize, parentRef: usize): void {
|
|||||||
if (GC_IMPLEMENTED) __gc_link(changetype<usize>(ref), changetype<usize>(parentRef));
|
if (GC_IMPLEMENTED) __gc_link(changetype<usize>(ref), changetype<usize>(parentRef));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Unlinks a registered object from an object that was referencing it. */
|
/** Releases a registered object. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @inline
|
@unsafe @inline
|
||||||
export function UNLINK<T,TParent>(ref: T, parentRef: TParent): void {
|
export function RELEASE<T,TParent>(ref: T, parentRef: TParent): void {
|
||||||
if (!isManaged<T>()) ERROR("managed reference expected");
|
if (!isManaged<T>()) ERROR("managed reference expected");
|
||||||
if (!isManaged<TParent>()) ERROR("managed reference expected");
|
if (!isManaged<TParent>()) ERROR("managed reference expected");
|
||||||
doUnlink(changetype<usize>(ref), changetype<usize>(parentRef));
|
doRelease(changetype<usize>(ref), changetype<usize>(parentRef));
|
||||||
}
|
}
|
||||||
|
|
||||||
function doUnlink(ref: usize, parentRef: usize): void {
|
function doRelease(ref: usize, parentRef: usize): void {
|
||||||
if (!ASC_NO_ASSERT) {
|
if (!ASC_NO_ASSERT) {
|
||||||
assertRegistered(ref);
|
assertRegistered(ref);
|
||||||
assertRegistered(parentRef);
|
assertRegistered(parentRef);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { LINK, UNLINK } from "./runtime";
|
import { RETAIN, RELEASE } from "./runtime";
|
||||||
import { HASH } from "./util/hash";
|
import { HASH } from "./util/hash";
|
||||||
|
|
||||||
// A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht
|
// A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht
|
||||||
@ -109,7 +109,7 @@ export class Set<K> {
|
|||||||
changetype<usize>(entries) + this.entriesOffset++ * ENTRY_SIZE<K>()
|
changetype<usize>(entries) + this.entriesOffset++ * ENTRY_SIZE<K>()
|
||||||
);
|
);
|
||||||
// link with the set
|
// link with the set
|
||||||
entry.key = isManaged<K>() ? LINK<K,this>(key, this) : key;
|
entry.key = isManaged<K>() ? RETAIN<K,this>(key, this) : key;
|
||||||
++this.entriesCount;
|
++this.entriesCount;
|
||||||
// link with previous entry in bucket
|
// link with previous entry in bucket
|
||||||
let bucketPtrBase = changetype<usize>(this.buckets) + <usize>(hashCode & this.bucketsMask) * BUCKET_SIZE;
|
let bucketPtrBase = changetype<usize>(this.buckets) + <usize>(hashCode & this.bucketsMask) * BUCKET_SIZE;
|
||||||
@ -121,7 +121,7 @@ export class Set<K> {
|
|||||||
delete(key: K): bool {
|
delete(key: K): bool {
|
||||||
var entry = this.find(key, HASH<K>(key));
|
var entry = this.find(key, HASH<K>(key));
|
||||||
if (!entry) return false;
|
if (!entry) return false;
|
||||||
if (isManaged<K>()) UNLINK<K,this>(entry.key, this);
|
if (isManaged<K>()) RELEASE<K,this>(entry.key, this);
|
||||||
entry.taggedNext |= EMPTY;
|
entry.taggedNext |= EMPTY;
|
||||||
--this.entriesCount;
|
--this.entriesCount;
|
||||||
// check if rehashing is appropriate
|
// check if rehashing is appropriate
|
||||||
@ -168,20 +168,20 @@ export class Set<K> {
|
|||||||
return "[object Set]";
|
return "[object Set]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// private __gc(): void {
|
// GC integration
|
||||||
// __gc_mark(changetype<usize>(this.buckets)); // tslint:disable-line
|
|
||||||
// var entries = this.entries;
|
@unsafe private __iter(fn: (ref: usize) => void): void {
|
||||||
// __gc_mark(changetype<usize>(entries)); // tslint:disable-line
|
fn(changetype<usize>(this.buckets));
|
||||||
// if (isManaged<K>()) {
|
var entries = this.entries;
|
||||||
// let offset: usize = 0;
|
fn(changetype<usize>(entries));
|
||||||
// let end: usize = this.entriesOffset * ENTRY_SIZE<K>();
|
if (isManaged<K>()) {
|
||||||
// while (offset < end) {
|
let cur = changetype<usize>(entries);
|
||||||
// let entry = changetype<SetEntry<K>>(
|
let end = cur + <usize>this.entriesOffset * ENTRY_SIZE<K>();
|
||||||
// changetype<usize>(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE<K>()
|
while (cur < end) {
|
||||||
// );
|
let entry = changetype<SetEntry<K>>(cur);
|
||||||
// if (!(entry.taggedNext & EMPTY)) __gc_mark(changetype<usize>(entry.key)); // tslint:disable-line
|
if (!(entry.taggedNext & EMPTY)) fn(changetype<usize>(entry.key));
|
||||||
// offset += ENTRY_SIZE<K>();
|
cur += ENTRY_SIZE<K>();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, LINK } from "./runtime";
|
import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, RETAIN } from "./runtime";
|
||||||
import { MAX_SIZE_32 } from "./util/allocator";
|
import { MAX_SIZE_32 } from "./util/allocator";
|
||||||
import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string";
|
import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string";
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut
|
|||||||
// result[i] = charStr
|
// result[i] = charStr
|
||||||
store<String>(resultStart + (<usize>i << alignof<usize>()),
|
store<String>(resultStart + (<usize>i << alignof<usize>()),
|
||||||
isManaged<String>()
|
isManaged<String>()
|
||||||
? LINK<String,Array<String>>(REGISTER<String>(charStr), result)
|
? RETAIN<String,Array<String>>(REGISTER<String>(charStr), result)
|
||||||
: REGISTER<String>(charStr)
|
: REGISTER<String>(charStr)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 130
|
i32.const 135
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -70,7 +70,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 153
|
i32.const 158
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -81,7 +81,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 154
|
i32.const 159
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -107,7 +107,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 76
|
i32.const 81
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -125,7 +125,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 77
|
i32.const 82
|
||||||
i32.const 11
|
i32.const 11
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -138,7 +138,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 414
|
i32.const 419
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -155,7 +155,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 144
|
i32.const 149
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -166,7 +166,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 145
|
i32.const 150
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -189,7 +189,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 124
|
i32.const 129
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -215,7 +215,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 244
|
i32.const 249
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -238,7 +238,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 246
|
i32.const 251
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -339,7 +339,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 68
|
i32.const 73
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -353,7 +353,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 69
|
i32.const 74
|
||||||
i32.const 11
|
i32.const 11
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -369,7 +369,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 320
|
i32.const 325
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -381,7 +381,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 321
|
i32.const 326
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -394,7 +394,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 322
|
i32.const 327
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -416,7 +416,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 175
|
i32.const 180
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -430,7 +430,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 177
|
i32.const 182
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -454,7 +454,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 179
|
i32.const 184
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -466,7 +466,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 183
|
i32.const 188
|
||||||
i32.const 23
|
i32.const 23
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -508,7 +508,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 197
|
i32.const 202
|
||||||
i32.const 24
|
i32.const 24
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -522,7 +522,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 199
|
i32.const 204
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -571,7 +571,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 212
|
i32.const 217
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -650,7 +650,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 363
|
i32.const 368
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -661,7 +661,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 364
|
i32.const 369
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -672,7 +672,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 365
|
i32.const 370
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -689,7 +689,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 370
|
i32.const 375
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -717,7 +717,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 379
|
i32.const 384
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -770,7 +770,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 408
|
i32.const 413
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -795,7 +795,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 282
|
i32.const 287
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -875,7 +875,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 309
|
i32.const 314
|
||||||
i32.const 16
|
i32.const 16
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -903,7 +903,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 334
|
i32.const 339
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -923,7 +923,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 335
|
i32.const 340
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -934,7 +934,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 336
|
i32.const 341
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -986,7 +986,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 354
|
i32.const 359
|
||||||
i32.const 25
|
i32.const 25
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1149,7 +1149,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 467
|
i32.const 472
|
||||||
i32.const 12
|
i32.const 12
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1164,7 +1164,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 470
|
i32.const 475
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -2523,7 +2523,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 483
|
i32.const 488
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 109
|
i32.const 114
|
||||||
i32.const 0
|
i32.const 0
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -119,7 +119,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 130
|
i32.const 135
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -140,7 +140,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 153
|
i32.const 158
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -152,7 +152,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 154
|
i32.const 159
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -185,7 +185,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 76
|
i32.const 81
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -205,7 +205,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 77
|
i32.const 82
|
||||||
i32.const 11
|
i32.const 11
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -221,7 +221,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 414
|
i32.const 419
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -239,7 +239,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 144
|
i32.const 149
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -251,7 +251,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 145
|
i32.const 150
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -275,7 +275,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 124
|
i32.const 129
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -305,7 +305,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 244
|
i32.const 249
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -331,7 +331,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 246
|
i32.const 251
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -442,7 +442,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 68
|
i32.const 73
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -456,7 +456,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 69
|
i32.const 74
|
||||||
i32.const 11
|
i32.const 11
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -473,7 +473,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 320
|
i32.const 325
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -486,7 +486,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 321
|
i32.const 326
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -499,7 +499,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 322
|
i32.const 327
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -525,7 +525,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 175
|
i32.const 180
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -540,7 +540,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 177
|
i32.const 182
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -566,7 +566,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 179
|
i32.const 184
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -578,7 +578,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 183
|
i32.const 188
|
||||||
i32.const 23
|
i32.const 23
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -626,7 +626,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 197
|
i32.const 202
|
||||||
i32.const 24
|
i32.const 24
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -644,7 +644,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 199
|
i32.const 204
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -699,7 +699,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 212
|
i32.const 217
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -790,7 +790,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 363
|
i32.const 368
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -803,7 +803,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 364
|
i32.const 369
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -816,7 +816,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 365
|
i32.const 370
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -837,7 +837,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 370
|
i32.const 375
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -866,7 +866,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 379
|
i32.const 384
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -937,7 +937,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 408
|
i32.const 413
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -953,7 +953,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 408
|
i32.const 413
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -983,7 +983,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 282
|
i32.const 287
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1079,7 +1079,7 @@
|
|||||||
else
|
else
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 309
|
i32.const 314
|
||||||
i32.const 16
|
i32.const 16
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1116,7 +1116,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 334
|
i32.const 339
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1136,7 +1136,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 335
|
i32.const 340
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1149,7 +1149,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 336
|
i32.const 341
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1209,7 +1209,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 354
|
i32.const 359
|
||||||
i32.const 25
|
i32.const 25
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1439,7 +1439,7 @@
|
|||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 467
|
i32.const 472
|
||||||
i32.const 12
|
i32.const 12
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1460,7 +1460,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 470
|
i32.const 475
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -3211,7 +3211,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 483
|
i32.const 488
|
||||||
i32.const 6
|
i32.const 6
|
||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user