more progress on destructor based strings

This commit is contained in:
Andreas Rumpf 2018-07-13 21:15:47 +02:00
commit 74bf316619
16 changed files with 279 additions and 244 deletions

View file

@ -1049,8 +1049,8 @@ proc transformStmt*(g: ModuleGraph; module: PSym, n: PNode): PNode =
when useEffectSystem: trackTopLevelStmt(g, module, result)
#if n.info ?? "temp.nim":
# echo renderTree(result, {renderIds})
if c.needsDestroyPass:
result = injectDestructorCalls(g, module, result)
#if c.needsDestroyPass:
# result = injectDestructorCalls(g, module, result)
incl(result.flags, nfTransf)
proc transformExpr*(g: ModuleGraph; module: PSym, n: PNode): PNode =
@ -1062,6 +1062,6 @@ proc transformExpr*(g: ModuleGraph; module: PSym, n: PNode): PNode =
liftDefer(c, result)
# expressions are not to be injected with destructor calls as that
# the list of top level statements needs to be collected before.
if c.needsDestroyPass:
result = injectDestructorCalls(g, module, result)
#if c.needsDestroyPass:
# result = injectDestructorCalls(g, module, result)
incl(result.flags, nfTransf)