diff options
author | Araq <rumpf_a@web.de> | 2011-04-17 20:17:45 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-04-17 20:17:45 +0200 |
commit | 48dd9679bd2196369a8a6f93f6225ad730683c25 (patch) | |
tree | b688e2d7e426c571b7fd898b6866205b70925e0d /lib/system/gc.nim | |
parent | e487c0a2491fcc144cb47b54597a320e2bf79866 (diff) | |
download | Nim-48dd9679bd2196369a8a6f93f6225ad730683c25.tar.gz |
:= templatable; lexer improvements
Diffstat (limited to 'lib/system/gc.nim')
-rwxr-xr-x | lib/system/gc.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index eb4811bf5..950b60c27 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -642,7 +642,11 @@ proc unmarkStackAndRegisters(gch: var TGcHeap) = var d = gch.decStack.d for i in 0..gch.decStack.len-1: assert isAllocatedPtr(allocator, d[i]) - decRef(d[i]) # OPT: cannot create a cycle! + # decRef(d[i]) inlined: cannot create a cycle + var c = d[i] + if atomicDec(c.refcount, rcIncrement) <% rcIncrement: + rtlAddZCT(c) + assert c.typ != nil gch.decStack.len = 0 proc collectCT(gch: var TGcHeap) = |