cycle collector (#14071)

* figured out the wrong cycle trace proc problem
* cycle collector/break refactorings and minor improvements
This commit is contained in:
Andreas Rumpf 2020-04-22 17:34:35 +02:00 • committed by GitHub
commit 269a458d74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 262 additions and 110 deletions

View file

@ -1297,7 +1297,8 @@ proc genHook(m: BModule; t: PType; info: TLineInfo; op: TTypeAttachedOp): Rope =
if op == attachedTrace and m.config.selectedGC == gcOrc and
containsGarbageCollectedRef(t):
when false:
# re-enable this check
# unfortunately this check is wrong for an object type that only contains
# .cursor fields like 'Node' inside 'cycleleak'.
internalError(m.config, info, "no attached trace proc found")
result = rope("NIM_NIL")