ORC: critical bugfix for the cycle analyser, introduce -d:nimStressOrc for easier stress testing (#15572)

This commit is contained in:
Andreas Rumpf
2020-10-14 22:26:21 +02:00
committed by GitHub
parent c2ba4ef979
commit 644eb4dd54
3 changed files with 33 additions and 20 deletions

View File

@@ -518,7 +518,7 @@ proc atomicRefOp(c: var TLiftCtx; t: PType; body, x, y: PNode) =
addDestructorCall(c, elemType, newNodeI(nkStmtList, c.info), genDeref(x, nkDerefExpr))
actions.add callCodegenProc(c.g, "nimDestroyAndDispose", c.info, x)
let isCyclic = c.g.config.selectedGC == gcOrc and types.canFormAcycle(t)
let isCyclic = c.g.config.selectedGC == gcOrc and types.canFormAcycle(elemType)
var cond: PNode
if isCyclic: