code gen bugfixes; marshal.nim implemented

This commit is contained in:
Araq 2011-06-26 17:21:52 +02:00
commit 990dc2d715
21 changed files with 725 additions and 422 deletions

View file

@ -198,18 +198,18 @@ proc prepareDealloc(cell: PCell) =
proc rtlAddCycleRoot(c: PCell) {.rtl, inl.} =
# we MUST access gch as a global here, because this crosses DLL boundaries!
when hasThreadSupport:
when hasThreadSupport and hasSharedHeap:
AcquireSys(HeapLock)
incl(gch.cycleRoots, c)
when hasThreadSupport:
when hasThreadSupport and hasSharedHeap:
ReleaseSys(HeapLock)
proc rtlAddZCT(c: PCell) {.rtl, inl.} =
# we MUST access gch as a global here, because this crosses DLL boundaries!
when hasThreadSupport:
when hasThreadSupport and hasSharedHeap:
AcquireSys(HeapLock)
addZCT(gch.zct, c)
when hasThreadSupport:
when hasThreadSupport and hasSharedHeap:
ReleaseSys(HeapLock)
proc decRef(c: PCell) {.inline.} =