summary refs log tree commit diff stats
path: root/compiler/cgmeth.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-01-02 07:30:39 +0100
committerGitHub <noreply@github.com>2021-01-02 07:30:39 +0100
commit73a8b950cb6abf36a0d29c210bb7db302ae68325 (patch)
treebd018fe111180437d3fe86b5ccae5376905aab54 /compiler/cgmeth.nim
parent0d0e43469f060818ec09d74de5b0bb7ded891898 (diff)
downloadNim-73a8b950cb6abf36a0d29c210bb7db302ae68325.tar.gz
big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
Diffstat (limited to 'compiler/cgmeth.nim')
-rw-r--r--compiler/cgmeth.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim
index a0c16f2ed..5c5d35093 100644
--- a/compiler/cgmeth.nim
+++ b/compiler/cgmeth.nim
@@ -108,10 +108,10 @@ proc attachDispatcher(s: PSym, dispatcher: PNode) =
     s.ast[dispatcherPos] = dispatcher
 
 proc createDispatcher(s: PSym; idgen: IdGenerator): PSym =
-  var disp = copySym(s, nextId(idgen))
+  var disp = copySym(s, nextSymId(idgen))
   incl(disp.flags, sfDispatcher)
   excl(disp.flags, sfExported)
-  disp.typ = copyType(disp.typ, nextId(idgen), disp.typ.owner)
+  disp.typ = copyType(disp.typ, nextTypeId(idgen), disp.typ.owner)
   # we can't inline the dispatcher itself (for now):
   if disp.typ.callConv == ccInline: disp.typ.callConv = ccNimCall
   disp.ast = copyTree(s.ast)
@@ -119,7 +119,7 @@ proc createDispatcher(s: PSym; idgen: IdGenerator): PSym =
   disp.loc.r = nil
   if s.typ[0] != nil:
     if disp.ast.len > resultPos:
-      disp.ast[resultPos].sym = copySym(s.ast[resultPos].sym, nextId(idgen))
+      disp.ast[resultPos].sym = copySym(s.ast[resultPos].sym, nextSymId(idgen))
     else:
       # We've encountered a method prototype without a filled-in
       # resultPos slot. We put a placeholder in there that will