mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
removed nimKeepAlive as it's not necessary with interior pointer checking
This commit is contained in:
@@ -34,8 +34,6 @@ const
|
||||
rcWhite = 0b010 # member of a garbage cycle
|
||||
rcPurple = 0b011 # possible root of a cycle
|
||||
rcZct = 0b100 # in ZCT
|
||||
rcMarked = 0b101 # dummy write to keep C code generator from
|
||||
# eliminating the root
|
||||
rcRed = 0b101 # Candidate cycle undergoing sigma-computation
|
||||
rcOrange = 0b110 # Candidate cycle awaiting epoch boundary
|
||||
rcShift = 3 # shift by rcShift to get the reference counter
|
||||
@@ -588,11 +586,6 @@ proc gcMark(gch: var TGcHeap, p: pointer) {.inline.} =
|
||||
add(gch.decStack, cell)
|
||||
sysAssert(allocInv(gch.region), "gcMark end")
|
||||
|
||||
proc nimKeepAlive(p: PGenericSeq) {.compilerRtl, noinline.} =
|
||||
var c = usrToCell(p)
|
||||
if isAllocatedPtr(gch.region, c):
|
||||
c.refcount = c.refcount or rcMarked
|
||||
|
||||
proc markThreadStacks(gch: var TGcHeap) =
|
||||
when hasThreadSupport and hasSharedHeap:
|
||||
{.error: "not fully implemented".}
|
||||
|
||||
Reference in New Issue
Block a user