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
commit 644eb4dd54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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: