merged the persistent scopes work with the delayed proc compilation strategy

This commit is contained in:
Zahary Karadjov 2013-05-12 14:41:32 +03:00
commit 14b5d5f262
12 changed files with 93 additions and 42 deletions

View file

@ -1374,7 +1374,7 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
msgs.gErrorMax = high(int)
# open a scope for temporary symbol inclusions:
let oldTos = c.scopeDepth
let oldScope = c.currentScope
openScope(c)
let oldOwnerLen = len(gOwners)
let oldGenerics = c.generics
@ -1398,7 +1398,7 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
c.p = oldProcCon
msgs.setInfoContextLen(oldContextLen)
setlen(gOwners, oldOwnerLen)
while c.scopeDepth > oldTos: rawCloseScope(c)
c.currentScope = oldScope
dec c.InCompilesContext
dec msgs.gSilence
msgs.gErrorCounter = oldErrorCount