summary refs log tree commit diff stats
path: root/compiler/cgmeth.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/cgmeth.nim
parent78f37b233654a33b4f7ee0427a80043cea54a61a (diff)
downloadNim-c517639155d50e32606583092bdfb3538ee76cf7.tar.gz
lazy loading of body ast implemented
Diffstat (limited to 'compiler/cgmeth.nim')
-rwxr-xr-xcompiler/cgmeth.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim
index e2c3c009c..ccd750445 100755
--- a/compiler/cgmeth.nim
+++ b/compiler/cgmeth.nim
@@ -95,7 +95,7 @@ proc methodDef*(s: PSym, fromCache: bool) =
     # we can't inline the dispatcher itself (for now):
     if disp.typ.callConv == ccInline: disp.typ.callConv = ccDefault
     disp.ast = copyTree(s.ast)
-    disp.ast.sons[codePos] = ast.emptyNode
+    disp.ast.sons[bodyPos] = ast.emptyNode
     if s.typ.sons[0] != nil: 
       disp.ast.sons[resultPos].sym = copySym(s.ast.sons[resultPos].sym)
     attachDispatcher(s, newSymNode(disp))
@@ -183,7 +183,7 @@ proc genDispatcher(methods: TSymSeq, relevantCols: TIntSet): PSym =
       addSon(disp, a)
     else:
       disp = ret
-  result.ast.sons[codePos] = disp
+  result.ast.sons[bodyPos] = disp
 
 proc generateMethodDispatchers*(): PNode = 
   result = newNode(nkStmtList)