first implementation of write tracking and escape analysis; still disabled

This commit is contained in:
Araq 2015-08-31 11:09:12 +02:00
commit e733debec7
5 changed files with 319 additions and 21 deletions

View file

@ -115,7 +115,7 @@ proc transformSymAux(c: PTransf, n: PNode): PNode =
# return liftIterSym(n)
var b: PNode
var tc = c.transCon
if sfBorrow in n.sym.flags:
if sfBorrow in n.sym.flags and n.sym.kind in routineKinds:
# simply exchange the symbol:
b = n.sym.getBody
if b.kind != nkSym: internalError(n.info, "wrong AST for borrowed symbol")