lazy loading of body ast implemented
This commit is contained in:
parent
78f37b2336
commit
c517639155
21 changed files with 152 additions and 83 deletions
|
|
@ -42,7 +42,7 @@ proc cleanUp(c: PPassContext, n: PNode): PNode =
|
|||
if n.sons[namePos].kind == nkSym:
|
||||
var s = n.sons[namePos].sym
|
||||
if sfDeadCodeElim notin getModule(s).flags and not astNeeded(s):
|
||||
s.ast.sons[codePos] = ast.emptyNode # free the memory
|
||||
s.ast.sons[bodyPos] = ast.emptyNode # free the memory
|
||||
else:
|
||||
nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue