mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 05:01:52 +00:00
decisions
This commit is contained in:
@ -9,8 +9,8 @@ const TRACE = false;
|
||||
@inline
|
||||
export const HEADER_SIZE: usize = (offsetof<ManagedObject>() + AL_MASK) & ~AL_MASK;
|
||||
|
||||
import { ITERATEROOTS } from "../runtime";
|
||||
import { AL_MASK, MAX_SIZE_32 } from "../util/allocator";
|
||||
import { gc } from "../gc";
|
||||
|
||||
/** Collector states. */
|
||||
const enum State {
|
||||
@ -140,7 +140,7 @@ function step(): void {
|
||||
}
|
||||
case State.IDLE: {
|
||||
if (TRACE) trace("gc~step/IDLE");
|
||||
gc.iterateRoots(__gc_mark);
|
||||
ITERATEROOTS(__gc_mark);
|
||||
state = State.MARK;
|
||||
if (TRACE) trace("gc~state = MARK");
|
||||
break;
|
||||
@ -161,7 +161,7 @@ function step(): void {
|
||||
obj.hookFn(objToRef(obj));
|
||||
} else {
|
||||
if (TRACE) trace("gc~step/MARK finish");
|
||||
gc.iterateRoots(__gc_mark);
|
||||
ITERATEROOTS(__gc_mark);
|
||||
obj = iter.next;
|
||||
if (obj === toSpace) {
|
||||
let from = fromSpace;
|
||||
|
Reference in New Issue
Block a user