make ref_unlink optional and itcm pass a simple test again

note: there's no marking yet
This commit is contained in:
dcode
2019-03-29 18:56:32 +01:00
parent a3aa9a3961
commit 6a790321aa
15 changed files with 5445 additions and 89 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
@global const GC_TRACE = true;
import "allocator/arena";
import "collector/itcm";
import { HEADER_SIZE } from "runtime";
assert(HEADER_SIZE == 16);
assert(gc.implemented);
gc.collect(); // trigger init
class Ref {}
trace("# ref = new Ref()");
var ref = new Ref();
trace("# arr = new Array(1)");
var arr = new Array<Ref | null>(1);
trace("# arr[0] = ref");
arr[0] = ref;
trace("# arr[0] = null");
arr[0] = null;
// TODO...
@start export function main(): void {}

File diff suppressed because it is too large Load Diff