ARC: use the new .cursor annotation for 'up' pointers

This commit is contained in:
Araq 2019-11-13 11:23:07 +01:00 • committed by Andreas Rumpf
commit 3020e49b75
2 changed files with 7 additions and 3 deletions

View file

@ -66,7 +66,7 @@ proc fillBodyObj(c: var TLiftCtx; n, body, x, y: PNode) =
of nkSym:
let f = n.sym
if sfCursor in f.flags and f.typ.skipTypes(abstractInst).kind in {tyRef, tyProc} and
c.g.config.selectedGC == gcDestructors:
c.g.config.selectedGC in {gcDestructors, gcHooks}:
defaultOp(c, f.typ, body, x.dotField(f), y.dotField(f))
else:
fillBody(c, f.typ, body, x.dotField(f), y.dotField(f))