Merge pull request #4592 from arnetheduck/compiler-cleanup

Compiler cleanup
This commit is contained in:
Andreas Rumpf 2016-08-25 16:50:54 +02:00 • committed by GitHub
commit 10f445da89
27 changed files with 12 additions and 464 deletions

View file

@ -1141,11 +1141,6 @@ type
TProcCompilationSteps = enum
stepRegisterSymbol,
stepDetermineType,
stepCompileBody
proc isForwardDecl(s: PSym): bool =
internalAssert s.kind == skProc
result = s.ast[bodyPos].kind != nkEmpty
proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
validPragmas: TSpecialWords,
@ -1183,8 +1178,6 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
s.ast = n
#s.scope = c.currentScope
# if typeIsDetermined: assert phase == stepCompileBody
# else: assert phase == stepDetermineType
# before compiling the proc body, set as current the scope
# where the proc was declared
let oldScope = c.currentScope
@ -1566,8 +1559,3 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
proc semStmt(c: PContext, n: PNode): PNode =
# now: simply an alias:
result = semExprNoType(c, n)
proc semStmtScope(c: PContext, n: PNode): PNode =
openScope(c)
result = semStmt(c, n)
closeScope(c)