Refactor injectdestructors (#12295)

One improvement over #devel is visible in the transformation of getEnv. With this approach we move to result whenever possible.
This commit is contained in:
Clyybber 2019-10-01 14:09:24 +02:00 • committed by Andreas Rumpf
commit 5f5879dc4c
7 changed files with 257 additions and 577 deletions

View file

@ -663,7 +663,6 @@ proc transformFor(c: PTransf, n: PNode): PTransNode =
t = arg.typ
# generate a temporary and produce an assignment statement:
var temp = newTemp(c, t, formal.info)
#temp.sym.flags.incl sfCursor
addVar(v, temp)
add(stmtList, newAsgnStmt(c, nkFastAsgn, temp, arg.PTransNode))
idNodeTablePut(newC.mapping, formal, temp)