Merge pull request #8966 from LemonBoy/fix-8964

Fix hashing for codegenProc (sic) types
This commit is contained in:
Andreas Rumpf 2018-09-14 22:28:12 +02:00 • committed by GitHub
commit 0c04b80651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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