code gen bugfixes; marshal.nim implemented
This commit is contained in:
parent
db0a4a9f86
commit
990dc2d715
21 changed files with 725 additions and 422 deletions
|
|
@ -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.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue