summary refs log tree commit diff stats
path: root/compiler/plugins/locals.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-10-25 08:50:47 +0100
committerGitHub <noreply@github.com>2020-10-25 08:50:47 +0100
commit226595515c25785eaf078834dfb6f0ac337a5278 (patch)
treea534966892d7712baf77b4d4f340fdbe42c0f3c8 /compiler/plugins/locals.nim
parent7252a50fefb844d97ad4630c1db00063380ff3c4 (diff)
downloadNim-226595515c25785eaf078834dfb6f0ac337a5278.tar.gz
explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
Diffstat (limited to 'compiler/plugins/locals.nim')
-rw-r--r--compiler/plugins/locals.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/plugins/locals.nim b/compiler/plugins/locals.nim
index f3ee94547..efa8b1e94 100644
--- a/compiler/plugins/locals.nim
+++ b/compiler/plugins/locals.nim
@@ -27,13 +27,13 @@ proc semLocals*(c: PContext, n: PNode): PNode =
             {tyVarargs, tyOpenArray, tyTypeDesc, tyStatic, tyUntyped, tyTyped, tyEmpty}:
 
         if it.owner == owner:
-          var field = newSym(skField, it.name, owner, n.info)
+          var field = newSym(skField, it.name, nextId c.idgen, owner, n.info)
           field.typ = it.typ.skipTypes({tyVar})
           field.position = counter
           inc(counter)
 
           tupleType.n.add newSymNode(field)
-          addSonSkipIntLit(tupleType, field.typ)
+          addSonSkipIntLit(tupleType, field.typ, c.idgen)
 
           var a = newSymNode(it, result.info)
           if it.typ.skipTypes({tyGenericInst}).kind == tyVar: a = newDeref(a)