gc:destructors progress

This commit is contained in:
Araq 2019-09-01 23:28:26 +02:00
commit ad82e65387
7 changed files with 31 additions and 79 deletions

View file

@ -2028,7 +2028,7 @@ proc genMove(p: BProc; n: PNode; d: var TLoc) =
resetLoc(p, a)
proc genDestroy(p: BProc; n: PNode) =
if optNimV2 in p.config.globalOptions:
if p.config.selectedGC == gcDestructors:
let arg = n[1].skipAddr
let t = arg.typ.skipTypes(abstractInst)
case t.kind