Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)

This commit is contained in:
Dominik Picheta 2021-10-13 10:09:45 +01:00 • committed by GitHub
commit 2aa97a228a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 2 additions and 79 deletions

View file

@ -428,16 +428,6 @@ proc sweep(gch: var GcHeap) =
if c.refcount == rcBlack: c.refcount = rcWhite
else: freeCyclicCell(gch, c)
when false:
# meant to be used with the now-deprected `.injectStmt`: {.injectStmt: newGcInvariant().}
proc newGcInvariant*() =
for x in allObjects(gch.region):
if isCell(x):
var c = cast[PCell](x)
if c.typ == nil:
writeStackTrace()
quit 1
proc markGlobals(gch: var GcHeap) =
if gch.gcThreadId == 0:
when defined(nimTracing):