compiler takes advantage of 'new(Obj|New)RC1

This commit is contained in:
Araq 2011-12-12 08:37:35 +01:00
commit 3c53c4c2b0
3 changed files with 89 additions and 77 deletions

View file

@ -230,6 +230,7 @@ proc decRef(c: PCell) {.inline.} =
if --c.refcount:
rtlAddZCT(c)
elif canBeCycleRoot(c):
# XXX if 'incRef' does this check, it should be unnecessary in 'decRef'
rtlAddCycleRoot(c)
proc incRef(c: PCell) {.inline.} =