introduce tfHasOwned for fast must-move checkings; removed tfAcyclic as the GC has ignored this hint for quite some time now

This commit is contained in:
Andreas Rumpf 2019-03-05 17:29:48 +01:00
commit 4be36d77f6
9 changed files with 30 additions and 63 deletions

View file

@ -893,7 +893,8 @@ proc transform(c: PTransf, n: PNode): PTransNode =
nkBlockStmt, nkBlockExpr}:
oldDeferAnchor = c.deferAnchor
c.deferAnchor = n
if n.typ != nil and tfHasAsgn in n.typ.flags:
if (n.typ != nil and tfHasAsgn in n.typ.flags) or
optNimV2 in c.graph.config.globalOptions:
c.needsDestroyPass = true
case n.kind
of nkSym: