Fix hashing for codegenProc (sic) types

Since the name mangling is inhibited we should take the user-supplied
name during the sighash computation.

Fixes #8964
This commit is contained in:
LemonBoy
2018-09-14 15:29:34 +02:00
parent 382fe446c3
commit 839953c3e1
3 changed files with 20 additions and 14 deletions

View File

@@ -7,12 +7,6 @@
# distribution, for details about the copyright.
#
when declared(ThisIsSystem):
# we are in system module:
{.pragma: codegenType, compilerproc.}
else:
{.pragma: codegenType.}
type
# This should be the same as ast.TTypeKind
# many enum fields are not used at runtime
@@ -79,7 +73,7 @@ type
tyVoidHidden
TNimNodeKind = enum nkNone, nkSlot, nkList, nkCase
TNimNode {.codegenType.} = object
TNimNode {.compilerProc.} = object
kind: TNimNodeKind
offset: int
typ: ptr TNimType
@@ -92,7 +86,7 @@ type
ntfAcyclic = 1, # type cannot form a cycle
ntfEnumHole = 2 # enum has holes and thus `$` for them needs the slow
# version
TNimType {.codegenType.} = object
TNimType {.compilerProc.} = object
size: int
kind: TNimKind
flags: set[TNimTypeFlag]
@@ -109,6 +103,6 @@ type
PNimType = ptr TNimType
when defined(nimTypeNames):
var nimTypeRoot {.codegenType.}: PNimType
var nimTypeRoot {.compilerProc.}: PNimType
# node.len may be the ``first`` element of a set