preparations for a generational GC

This commit is contained in:
Araq 2013-02-16 22:53:35 +01:00
commit 5d119f61d1
6 changed files with 13 additions and 6 deletions

View file

@ -16,7 +16,8 @@ const
# above X strings a hash-switch for strings is generated
proc registerGcRoot(p: BProc, v: PSym) =
if gSelectedGc == gcMarkAndSweep and containsGarbageCollectedRef(v.loc.t):
if gSelectedGc in {gcMarkAndSweep, gcGenerational} and
containsGarbageCollectedRef(v.loc.t):
# we register a specialized marked proc here; this has the advantage
# that it works out of the box for thread local storage then :-)
let prc = genTraverseProcForGlobal(p.module, v)