mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 23:42:15 +00:00
fix export star module exports, shiftify
This commit is contained in:
parent
2b0a165e7f
commit
2dec52976a
19
src/ast.ts
19
src/ast.ts
@ -687,6 +687,9 @@ export abstract class Node {
|
|||||||
range.source.normalizedPath
|
range.source.normalizedPath
|
||||||
);
|
);
|
||||||
} else { // absolute
|
} else { // absolute
|
||||||
|
if (!normalizedPath.startsWith(LIBRARY_PREFIX)) {
|
||||||
|
normalizedPath = LIBRARY_PREFIX + normalizedPath;
|
||||||
|
}
|
||||||
stmt.normalizedPath = normalizedPath;
|
stmt.normalizedPath = normalizedPath;
|
||||||
}
|
}
|
||||||
stmt.internalPath = mangleInternalPath(stmt.normalizedPath);
|
stmt.internalPath = mangleInternalPath(stmt.normalizedPath);
|
||||||
@ -782,10 +785,18 @@ export abstract class Node {
|
|||||||
stmt.declarations = null;
|
stmt.declarations = null;
|
||||||
stmt.namespaceName = identifier;
|
stmt.namespaceName = identifier;
|
||||||
stmt.path = path;
|
stmt.path = path;
|
||||||
stmt.normalizedPath = resolvePath(
|
var normalizedPath = normalizePath(path.value);
|
||||||
normalizePath(path.value),
|
if (path.value.startsWith(".")) {
|
||||||
range.source.normalizedPath
|
stmt.normalizedPath = resolvePath(
|
||||||
);
|
normalizedPath,
|
||||||
|
range.source.normalizedPath
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (!normalizedPath.startsWith(LIBRARY_PREFIX)) {
|
||||||
|
normalizedPath = LIBRARY_PREFIX + normalizedPath;
|
||||||
|
}
|
||||||
|
stmt.normalizedPath = normalizedPath;
|
||||||
|
}
|
||||||
stmt.internalPath = mangleInternalPath(stmt.normalizedPath);
|
stmt.internalPath = mangleInternalPath(stmt.normalizedPath);
|
||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
|
@ -716,7 +716,12 @@ export class Compiler extends DiagnosticEmitter {
|
|||||||
var exports = file.exports;
|
var exports = file.exports;
|
||||||
if (exports) for (let element of exports.values()) this.compileElement(element);
|
if (exports) for (let element of exports.values()) this.compileElement(element);
|
||||||
var exportsStar = file.exportsStar;
|
var exportsStar = file.exportsStar;
|
||||||
if (exportsStar) for (let exportStar of exportsStar) this.compileFile(exportStar);
|
if (exportsStar) {
|
||||||
|
for (let exportStar of exportsStar) {
|
||||||
|
this.compileFile(exportStar);
|
||||||
|
this.compileExports(exportStar);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// files
|
// files
|
||||||
|
@ -6,7 +6,7 @@ import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateB
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_allocate(size: usize, id: u32): usize {
|
export function __rt_allocate(size: usize, id: u32): usize {
|
||||||
var root = ROOT;
|
var root = ROOT;
|
||||||
if (!root) {
|
if (!root) {
|
||||||
initializeRoot();
|
initializeRoot();
|
||||||
@ -19,7 +19,7 @@ function __rt_allocate(size: usize, id: u32): usize {
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_reallocate(ref: usize, size: usize): usize {
|
export function __rt_reallocate(ref: usize, size: usize): usize {
|
||||||
if (DEBUG) assert(ROOT); // must be initialized
|
if (DEBUG) assert(ROOT); // must be initialized
|
||||||
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned
|
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned
|
||||||
return changetype<usize>(reallocateBlock(ROOT, changetype<Block>(ref - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD;
|
return changetype<usize>(reallocateBlock(ROOT, changetype<Block>(ref - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD;
|
||||||
@ -27,7 +27,7 @@ function __rt_reallocate(ref: usize, size: usize): usize {
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_free(ref: usize): void {
|
export function __rt_free(ref: usize): void {
|
||||||
if (DEBUG) assert(ROOT); // must be initialized
|
if (DEBUG) assert(ROOT); // must be initialized
|
||||||
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned
|
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned
|
||||||
freeBlock(ROOT, changetype<Block>(ref - BLOCK_OVERHEAD));
|
freeBlock(ROOT, changetype<Block>(ref - BLOCK_OVERHEAD));
|
||||||
@ -39,18 +39,20 @@ import { increment, decrement, collectCycles } from "./pure";
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_retain(ref: usize): void {
|
export function __rt_retain(ref: usize): void {
|
||||||
if (ref) increment(changetype<Block>(ref - BLOCK_OVERHEAD));
|
if (ref) increment(changetype<Block>(ref - BLOCK_OVERHEAD));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_release(ref: usize): void {
|
export function __rt_release(ref: usize): void {
|
||||||
if (ref) decrement(changetype<Block>(ref - BLOCK_OVERHEAD));
|
if (ref) decrement(changetype<Block>(ref - BLOCK_OVERHEAD));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_collect(): void {
|
export function __rt_collect(): void {
|
||||||
collectCycles();
|
collectCycles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { __rt_typeinfo };
|
||||||
|
@ -20,7 +20,7 @@ var offset: usize = startOffset;
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @global
|
@unsafe @global
|
||||||
function __rt_allocate(size: usize, id: u32): usize {
|
export function __rt_allocate(size: usize, id: u32): usize {
|
||||||
if (size > BLOCK_MAXSIZE) unreachable();
|
if (size > BLOCK_MAXSIZE) unreachable();
|
||||||
var ptr = offset + BLOCK_OVERHEAD;
|
var ptr = offset + BLOCK_OVERHEAD;
|
||||||
var newPtr = (ptr + max<usize>(size, 1) + AL_MASK) & ~AL_MASK;
|
var newPtr = (ptr + max<usize>(size, 1) + AL_MASK) & ~AL_MASK;
|
||||||
@ -41,7 +41,7 @@ function __rt_allocate(size: usize, id: u32): usize {
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @global
|
@unsafe @global
|
||||||
function __rt_reallocate(ref: usize, size: usize): usize {
|
export function __rt_reallocate(ref: usize, size: usize): usize {
|
||||||
var block = changetype<CommonBlock>(ref - BLOCK_OVERHEAD);
|
var block = changetype<CommonBlock>(ref - BLOCK_OVERHEAD);
|
||||||
var oldSize = <usize>block.rtSize;
|
var oldSize = <usize>block.rtSize;
|
||||||
if (size > oldSize) {
|
if (size > oldSize) {
|
||||||
@ -56,12 +56,12 @@ function __rt_reallocate(ref: usize, size: usize): usize {
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @global
|
@unsafe @global
|
||||||
function __rt_free(ref: usize): void {
|
export function __rt_free(ref: usize): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@unsafe @global
|
@unsafe @global
|
||||||
function __rt_reset(): void { // special
|
export function __rt_reset(): void { // special
|
||||||
offset = startOffset;
|
offset = startOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,15 +69,17 @@ function __rt_reset(): void { // special
|
|||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_retain(ref: usize): void {
|
export function __rt_retain(ref: usize): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_release(ref: usize): void {
|
export function __rt_release(ref: usize): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@global @unsafe
|
@global @unsafe
|
||||||
function __rt_collect(): void {
|
export function __rt_collect(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { __rt_typeinfo };
|
||||||
|
@ -146,37 +146,60 @@ import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common";
|
|||||||
/** Gets the second level map of the specified first level. */
|
/** Gets the second level map of the specified first level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function GETSL(root: Root, fl: usize): u32 {
|
@inline function GETSL(root: Root, fl: usize): u32 {
|
||||||
return load<u32>(changetype<usize>(root) + (fl << alignof<u32>()), SL_START);
|
return load<u32>(
|
||||||
|
changetype<usize>(root) + (fl << alignof<u32>()),
|
||||||
|
SL_START
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the second level map of the specified first level. */
|
/** Sets the second level map of the specified first level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function SETSL(root: Root, fl: usize, slMap: u32): void {
|
@inline function SETSL(root: Root, fl: usize, slMap: u32): void {
|
||||||
store<u32>(changetype<usize>(root) + (fl << alignof<u32>()), slMap, SL_START);
|
store<u32>(
|
||||||
|
changetype<usize>(root) + (fl << alignof<u32>()),
|
||||||
|
slMap,
|
||||||
|
SL_START
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the head of the free list for the specified combination of first and second level. */
|
/** Gets the head of the free list for the specified combination of first and second level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {
|
@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {
|
||||||
return changetype<Block>(load<usize>(changetype<usize>(root) + (fl * SL_SIZE + <usize>sl) * sizeof<usize>(), HL_START));
|
return changetype<Block>(
|
||||||
|
load<usize>(
|
||||||
|
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
||||||
|
HL_START
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the head of the free list for the specified combination of first and second level. */
|
/** Sets the head of the free list for the specified combination of first and second level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {
|
@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {
|
||||||
store<usize>(changetype<usize>(root) + (fl * SL_SIZE + <usize>sl) * sizeof<usize>() , changetype<usize>(head), HL_START);
|
store<usize>(
|
||||||
|
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
||||||
|
changetype<usize>(head),
|
||||||
|
HL_START
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the tail block.. */
|
/** Gets the tail block.. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function GETTAIL(root: Root): Block {
|
@inline function GETTAIL(root: Root): Block {
|
||||||
return load<Block>(changetype<usize>(root), HL_END);
|
return load<Block>(
|
||||||
|
changetype<usize>(root),
|
||||||
|
HL_END
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the tail block. */
|
/** Sets the tail block. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function SETTAIL(root: Root, tail: Block): void {
|
@inline function SETTAIL(root: Root, tail: Block): void {
|
||||||
store<Block>(changetype<usize>(root), tail, HL_END);
|
store<Block>(
|
||||||
|
changetype<usize>(root),
|
||||||
|
tail,
|
||||||
|
HL_END
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Inserts a previously used block back into the free list. */
|
/** Inserts a previously used block back into the free list. */
|
||||||
@ -229,7 +252,7 @@ function insertBlock(root: Root, block: Block): void {
|
|||||||
var fl: usize, sl: u32;
|
var fl: usize, sl: u32;
|
||||||
if (size < SB_SIZE) {
|
if (size < SB_SIZE) {
|
||||||
fl = 0;
|
fl = 0;
|
||||||
sl = <u32>(size / AL_SIZE);
|
sl = <u32>(size >> AL_BITS);
|
||||||
} else {
|
} else {
|
||||||
const inv: usize = sizeof<usize>() * 8 - 1;
|
const inv: usize = sizeof<usize>() * 8 - 1;
|
||||||
fl = inv - clz<usize>(size);
|
fl = inv - clz<usize>(size);
|
||||||
@ -261,7 +284,7 @@ function removeBlock(root: Root, block: Block): void {
|
|||||||
var fl: usize, sl: u32;
|
var fl: usize, sl: u32;
|
||||||
if (size < SB_SIZE) {
|
if (size < SB_SIZE) {
|
||||||
fl = 0;
|
fl = 0;
|
||||||
sl = <u32>(size / AL_SIZE);
|
sl = <u32>(size >> AL_BITS);
|
||||||
} else {
|
} else {
|
||||||
const inv: usize = sizeof<usize>() * 8 - 1;
|
const inv: usize = sizeof<usize>() * 8 - 1;
|
||||||
fl = inv - clz<usize>(size);
|
fl = inv - clz<usize>(size);
|
||||||
@ -302,7 +325,7 @@ function searchBlock(root: Root, size: usize): Block | null {
|
|||||||
var fl: usize, sl: u32;
|
var fl: usize, sl: u32;
|
||||||
if (size < SB_SIZE) {
|
if (size < SB_SIZE) {
|
||||||
fl = 0;
|
fl = 0;
|
||||||
sl = <u32>(size / AL_SIZE);
|
sl = <u32>(size >> AL_BITS);
|
||||||
} else {
|
} else {
|
||||||
const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl
|
const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl
|
||||||
const inv: usize = sizeof<usize>() * 8 - 1;
|
const inv: usize = sizeof<usize>() * 8 - 1;
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $4
|
local.set $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
@ -248,8 +248,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $2
|
local.set $2
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
@ -497,7 +497,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 427
|
i32.const 450
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -523,8 +523,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $1
|
local.set $1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 256
|
i32.const 279
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -66,7 +66,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 258
|
i32.const 281
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -78,8 +78,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $4
|
local.set $4
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $5
|
local.set $5
|
||||||
else
|
else
|
||||||
i32.const 31
|
i32.const 31
|
||||||
@ -118,7 +118,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 271
|
i32.const 294
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -151,12 +151,12 @@
|
|||||||
local.set $8
|
local.set $8
|
||||||
local.get $10
|
local.get $10
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -173,12 +173,12 @@
|
|||||||
local.set $8
|
local.set $8
|
||||||
local.get $11
|
local.get $11
|
||||||
local.get $10
|
local.get $10
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -256,7 +256,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 184
|
i32.const 207
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -271,7 +271,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 186
|
i32.const 209
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -370,7 +370,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 207
|
i32.const 230
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -433,7 +433,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 222
|
i32.const 245
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -449,7 +449,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 223
|
i32.const 246
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -466,8 +466,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $9
|
local.set $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $10
|
local.set $10
|
||||||
else
|
else
|
||||||
i32.const 31
|
i32.const 31
|
||||||
@ -506,7 +506,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 239
|
i32.const 262
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -520,12 +520,12 @@
|
|||||||
local.set $7
|
local.set $7
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -553,12 +553,12 @@
|
|||||||
local.set $7
|
local.set $7
|
||||||
local.get $12
|
local.get $12
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -629,7 +629,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 365
|
i32.const 388
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -654,7 +654,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 375
|
i32.const 398
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -685,7 +685,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 387
|
i32.const 410
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -862,12 +862,12 @@
|
|||||||
local.set $6
|
local.set $6
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -918,7 +918,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 427
|
i32.const 450
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -954,8 +954,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $2
|
local.set $2
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $3
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -1012,7 +1012,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 317
|
i32.const 340
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1077,7 +1077,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 330
|
i32.const 353
|
||||||
i32.const 17
|
i32.const 17
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1092,12 +1092,12 @@
|
|||||||
local.set $5
|
local.set $5
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -1114,12 +1114,12 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
local.get $8
|
local.get $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -1195,7 +1195,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 344
|
i32.const 367
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1306,7 +1306,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 457
|
i32.const 480
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1324,7 +1324,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 459
|
i32.const 482
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1388,7 +1388,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 510
|
i32.const 533
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
import "rt";
|
export * from "rt";
|
||||||
|
|
||||||
export {
|
|
||||||
__rt_allocate,
|
|
||||||
__rt_reallocate,
|
|
||||||
__rt_free,
|
|
||||||
__rt_retain,
|
|
||||||
__rt_release,
|
|
||||||
__rt_collect,
|
|
||||||
__rt_typeinfo
|
|
||||||
};
|
|
||||||
|
|
||||||
@start export function main(): void {}
|
@start export function main(): void {}
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $4
|
local.set $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
@ -268,8 +268,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $2
|
local.set $2
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
@ -517,7 +517,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 427
|
i32.const 450
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -543,8 +543,8 @@
|
|||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $1
|
local.set $1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
else
|
else
|
||||||
|
Binary file not shown.
@ -63,7 +63,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 256
|
i32.const 279
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -88,7 +88,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 258
|
i32.const 281
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -100,8 +100,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $4
|
local.set $4
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $5
|
local.set $5
|
||||||
else
|
else
|
||||||
i32.const 31
|
i32.const 31
|
||||||
@ -140,7 +140,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 271
|
i32.const 294
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -173,12 +173,12 @@
|
|||||||
local.set $8
|
local.set $8
|
||||||
local.get $10
|
local.get $10
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -195,12 +195,12 @@
|
|||||||
local.set $8
|
local.set $8
|
||||||
local.get $11
|
local.get $11
|
||||||
local.get $10
|
local.get $10
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -278,7 +278,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 184
|
i32.const 207
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -293,7 +293,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 186
|
i32.const 209
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -392,7 +392,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 207
|
i32.const 230
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -455,7 +455,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 222
|
i32.const 245
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -471,7 +471,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 223
|
i32.const 246
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -488,8 +488,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $9
|
local.set $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $10
|
local.set $10
|
||||||
else
|
else
|
||||||
i32.const 31
|
i32.const 31
|
||||||
@ -528,7 +528,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 239
|
i32.const 262
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -542,12 +542,12 @@
|
|||||||
local.set $7
|
local.set $7
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -575,12 +575,12 @@
|
|||||||
local.set $7
|
local.set $7
|
||||||
local.get $12
|
local.get $12
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -651,7 +651,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 365
|
i32.const 388
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -676,7 +676,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 375
|
i32.const 398
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -707,7 +707,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 387
|
i32.const 410
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -884,12 +884,12 @@
|
|||||||
local.set $6
|
local.set $6
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $7
|
local.get $7
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.store offset=96
|
i32.store offset=96
|
||||||
@ -940,7 +940,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 427
|
i32.const 450
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -976,8 +976,8 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $2
|
local.set $2
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.div_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $3
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -1034,7 +1034,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 317
|
i32.const 340
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1099,7 +1099,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 330
|
i32.const 353
|
||||||
i32.const 17
|
i32.const 17
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1114,12 +1114,12 @@
|
|||||||
local.set $5
|
local.set $5
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $8
|
local.get $8
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -1136,12 +1136,12 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
local.get $8
|
local.get $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.const 16
|
i32.const 4
|
||||||
i32.mul
|
i32.shl
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 4
|
i32.const 2
|
||||||
i32.mul
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=96
|
i32.load offset=96
|
||||||
end
|
end
|
||||||
@ -1217,7 +1217,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 344
|
i32.const 367
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1328,7 +1328,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 457
|
i32.const 480
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1346,7 +1346,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 459
|
i32.const 482
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1622,7 +1622,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 472
|
i32.const 495
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1789,7 +1789,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 510
|
i32.const 533
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user