diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-05-12 01:20:40 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-05-12 01:20:40 +0300 |
commit | 7a2b1a7520bb80cbef88ad9c3dc843cbe512a588 (patch) | |
tree | 3a618acb804f76d1110c8037a5b2fb74b61adb5a /compiler/importer.nim | |
parent | 3d1c6de63853dc141b919dc853ade4380a478206 (diff) | |
download | Nim-7a2b1a7520bb80cbef88ad9c3dc843cbe512a588.tar.gz |
get rid of ImportTablePos and ModuleTablePos
Diffstat (limited to 'compiler/importer.nim')
-rw-r--r-- | compiler/importer.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim index d274b4693..ebb848ea7 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -48,7 +48,7 @@ proc rawImportSymbol(c: PContext, s: PSym) = # This does not handle stubs, because otherwise loading on demand would be # pointless in practice. So importing stubs is fine here! # check if we have already a symbol of the same name: - var check = StrTableGet(c.tab.stack[importTablePos], s.name) + var check = StrTableGet(c.importTable.symbols, s.name) if check != nil and check.id != s.id: if s.kind notin OverloadableSyms: # s and check need to be qualified: @@ -56,7 +56,7 @@ proc rawImportSymbol(c: PContext, s: PSym) = Incl(c.AmbiguousSymbols, check.id) # thanks to 'export' feature, it could be we import the same symbol from # multiple sources, so we need to call 'StrTableAdd' here: - StrTableAdd(c.tab.stack[importTablePos], s) + StrTableAdd(c.importTable.symbols, s) if s.kind == skType: var etyp = s.typ if etyp.kind in {tyBool, tyEnum} and sfPure notin s.flags: @@ -68,12 +68,12 @@ proc rawImportSymbol(c: PContext, s: PSym) = # have been put into the symbol table # BUGFIX: but only iff they are the same symbols! var it: TIdentIter - check = InitIdentIter(it, c.tab.stack[importTablePos], e.name) + check = InitIdentIter(it, c.importTable.symbols, e.name) while check != nil: if check.id == e.id: e = nil break - check = NextIdentIter(it, c.tab.stack[importTablePos]) + check = NextIdentIter(it, c.importTable.symbols) if e != nil: rawImportSymbol(c, e) else: |