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

@ -32,6 +32,8 @@ proc sameMethodDispatcher(a, b: PSym): bool =
# be disambiguated by the programmer; this way the right generic is
# instantiated.
proc determineType(c: PContext, s: PSym)
proc resolveOverloads(c: PContext, n, orig: PNode,
filter: TSymKinds): TCandidate =
var initialBinding: PNode
@ -58,6 +60,7 @@ proc resolveOverloads(c: PContext, n, orig: PNode,
while sym != nil:
if sym.kind in filter:
determineType(c, sym)
initCandidate(z, sym, initialBinding, o.lastOverloadScope)
z.calleeSym = sym
matches(c, n, orig, z)