summary refs log tree commit diff stats
path: root/compiler/cgmeth.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2023-04-24 06:52:37 +0200
committerGitHub <noreply@github.com>2023-04-24 06:52:37 +0200
commit20b011de19c507380164c46c04cce174842f8e9e (patch)
treefcb690aa9dcd2eb74aaeecf7cce675ae2d3fc7cf /compiler/cgmeth.nim
parent380dafcc32abed83148f5da78a2aaef608831f8a (diff)
downloadNim-20b011de19c507380164c46c04cce174842f8e9e.tar.gz
refactoring in preparation for better, simpler name mangling that wor… (#21667)
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly

* use new disamb field

* see if this makes tests green

* make tests green again
Diffstat (limited to 'compiler/cgmeth.nim')
-rw-r--r--compiler/cgmeth.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim
index 1711c5f9a..cc37691fd 100644
--- a/compiler/cgmeth.nim
+++ b/compiler/cgmeth.nim
@@ -113,7 +113,7 @@ proc attachDispatcher(s: PSym, dispatcher: PNode) =
     s.ast[dispatcherPos] = dispatcher
 
 proc createDispatcher(s: PSym; g: ModuleGraph; idgen: IdGenerator): PSym =
-  var disp = copySym(s, nextSymId(idgen))
+  var disp = copySym(s, idgen)
   incl(disp.flags, sfDispatcher)
   excl(disp.flags, sfExported)
   let old = disp.typ
@@ -127,7 +127,7 @@ proc createDispatcher(s: PSym; g: ModuleGraph; idgen: IdGenerator): PSym =
   disp.loc.r = ""
   if s.typ[0] != nil:
     if disp.ast.len > resultPos:
-      disp.ast[resultPos].sym = copySym(s.ast[resultPos].sym, nextSymId(idgen))
+      disp.ast[resultPos].sym = copySym(s.ast[resultPos].sym, idgen)
     else:
       # We've encountered a method prototype without a filled-in
       # resultPos slot. We put a placeholder in there that will