added a `noforward` pragma that enables a new compilation strategy
not requiring forward declarations on a per-module basis
This commit is contained in:
parent
40b411fb1c
commit
f44a4362bb
9 changed files with 76 additions and 22 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue