summary refs log tree commit diff stats
path: root/compiler/passaux.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-10-30 20:53:04 +0100
committerAraq <rumpf_a@web.de>2011-10-30 20:53:04 +0100
commitc517639155d50e32606583092bdfb3538ee76cf7 (patch)
treebf2c97c7818637693799cae3fd282bd765d80ebd /compiler/passaux.nim
parent78f37b233654a33b4f7ee0427a80043cea54a61a (diff)
downloadNim-c517639155d50e32606583092bdfb3538ee76cf7.tar.gz
lazy loading of body ast implemented
Diffstat (limited to 'compiler/passaux.nim')
-rwxr-xr-xcompiler/passaux.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/passaux.nim b/compiler/passaux.nim
index 659a9a346..3197e0b8c 100755
--- a/compiler/passaux.nim
+++ b/compiler/passaux.nim
@@ -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