get rid of the SymTab* procs in astalgo

This commit is contained in:
Zahary Karadjov 2013-05-12 00:49:00 +03:00
commit 3d1c6de638
11 changed files with 91 additions and 133 deletions

View file

@ -247,15 +247,15 @@ proc myOpen(module: PSym): PPassContext =
c.semTypeNode = semTypeNode
pushProcCon(c, module)
pushOwner(c.module)
openScope(c) # scope for imported symbols
SymTabAdd(c.tab, module) # a module knows itself
c.importTable = openScope(c)
c.importTable.addSym(module) # a module knows itself
if sfSystemModule in module.flags:
magicsys.SystemModule = module # set global variable!
InitSystem(c.tab) # currently does nothing
else:
SymTabAdd(c.tab, magicsys.SystemModule) # import the "System" identifier
c.importTable.addSym magicsys.SystemModule # import the "System" identifier
importAllSymbols(c, magicsys.SystemModule)
closeScope(c) # scope for the module's symbols
c.topLevelScope = openScope(c)
result = c
proc myOpenCached(module: PSym, rd: PRodReader): PPassContext =