mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 12:11:50 +00:00
make ref_unlink optional and itcm pass a simple test again
note: there's no marking yet
This commit is contained in:
2263
tests/compiler/gc/itcm/trace.optimized.wat
Normal file
2263
tests/compiler/gc/itcm/trace.optimized.wat
Normal file
File diff suppressed because it is too large
Load Diff
26
tests/compiler/gc/itcm/trace.ts
Normal file
26
tests/compiler/gc/itcm/trace.ts
Normal 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 {}
|
3036
tests/compiler/gc/itcm/trace.untouched.wat
Normal file
3036
tests/compiler/gc/itcm/trace.untouched.wat
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user