lazy loading of body ast implemented

This commit is contained in:
Araq 2011-10-30 20:53:04 +01:00
commit c517639155
21 changed files with 152 additions and 83 deletions

View file

@ -1734,7 +1734,7 @@ proc expr(p: BProc, e: PNode, d: var TLoc) =
var sym = e.sym
case sym.Kind
of skMethod:
if sym.ast.sons[codePos].kind == nkEmpty:
if sym.getBody.kind == nkEmpty:
# we cannot produce code for the dispatcher yet:
fillProcLoc(sym)
genProcPrototype(p.module, sym)