:= templatable; lexer improvements

This commit is contained in:
Araq 2011-04-17 20:17:45 +02:00
commit 48dd9679bd
11 changed files with 117 additions and 166 deletions

View file

@ -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) =