move stuff, run both untouched and optimized

This commit is contained in:
dcode
2019-05-21 15:02:39 +02:00
parent 7128d190a5
commit c92643832c
49 changed files with 34520 additions and 43738 deletions

View File

@ -534,7 +534,7 @@ export function freeBlock(root: Root, block: Block): void {
}
// @ts-ignore: decorator
@global @unsafe
@global @unsafe @builtin
export function __alloc(size: usize, id: u32): usize {
var root = ROOT;
if (!root) {
@ -547,7 +547,7 @@ export function __alloc(size: usize, id: u32): usize {
}
// @ts-ignore: decorator
@global @unsafe
@global @unsafe @builtin
export function __realloc(ref: usize, size: usize): usize {
if (DEBUG) assert(ROOT); // must be initialized
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned
@ -555,7 +555,7 @@ export function __realloc(ref: usize, size: usize): usize {
}
// @ts-ignore: decorator
@global @unsafe
@global @unsafe @builtin
export function __free(ref: usize): void {
if (DEBUG) assert(ROOT); // must be initialized
assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned