summary refs log tree commit diff stats
path: root/compiler/importer.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-05-12 01:20:40 +0300
committerZahary Karadjov <zahary@gmail.com>2013-05-12 01:20:40 +0300
commit7a2b1a7520bb80cbef88ad9c3dc843cbe512a588 (patch)
tree3a618acb804f76d1110c8037a5b2fb74b61adb5a /compiler/importer.nim
parent3d1c6de63853dc141b919dc853ade4380a478206 (diff)
downloadNim-7a2b1a7520bb80cbef88ad9c3dc843cbe512a588.tar.gz
get rid of ImportTablePos and ModuleTablePos
Diffstat (limited to 'compiler/importer.nim')
-rw-r--r--compiler/importer.nim8
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:
pan> ^
3e87ef35f ^
7e3ebc1bc ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61