added a `noforward` pragma that enables a new compilation strategy

not requiring forward declarations on a per-module basis
This commit is contained in:
Zahary Karadjov 2013-05-11 22:47:37 +03:00
commit f44a4362bb
9 changed files with 76 additions and 22 deletions

View file

@ -842,8 +842,10 @@ proc requestConstImpl(p: BProc, sym: PSym) =
if sfExportc in sym.flags and generatedHeader != nil:
app(generatedHeader.s[cfsData], headerDecl)
proc isActivated(prc: PSym): bool = prc.typ != nil
proc genProc(m: BModule, prc: PSym) =
if sfBorrow in prc.flags: return
if sfBorrow in prc.flags or not isActivated(prc): return
fillProcLoc(prc)
if {sfForward, sfFromGeneric} * prc.flags != {}: addForwardedProc(m, prc)
else: