summary refs log tree commit diff stats
path: root/compiler/ic
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-04-17 01:12:12 +0200
committerGitHub <noreply@github.com>2021-04-17 01:12:12 +0200
commit8e474fbb57c2f7b58a840b5b30230c2267633c8e (patch)
tree560ff92bbd62a67f03d6a0eedfcf5bd30bcd4ba2 /compiler/ic
parent201ac2b9c93a8c3677b4910a1986c91741aee0e3 (diff)
downloadNim-8e474fbb57c2f7b58a840b5b30230c2267633c8e.tar.gz
IC: yet another embarrassing omission (#17743)
* IC: yet another embarrassing omission

* VM: fewer hacks that kept IC from working
Diffstat (limited to 'compiler/ic')
-rw-r--r--compiler/ic/ic.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ic/ic.nim b/compiler/ic/ic.nim
index 1f2d502ae..da0af2edf 100644
--- a/compiler/ic/ic.nim
+++ b/compiler/ic/ic.nim
@@ -765,7 +765,8 @@ proc symHeaderFromPacked(c: var PackedDecoder; g: var PackedModuleGraph;
     kind: s.kind, magic: s.magic, flags: s.flags,
     info: translateLineInfo(c, g, si, s.info),
     options: s.options,
-    position: s.position,
+    position: if s.kind in {skForVar, skVar, skLet, skTemp}: 0 else: s.position,
+    offset: if s.kind in routineKinds: defaultOffset else: s.offset,
     name: getIdent(c.cache, g[si].fromDisk.sh.strings[s.name])
   )