diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-04-16 13:42:33 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-04-16 13:42:33 +0300 |
commit | 4da8536701516f88cf2a04152abb8d8a276042d6 (patch) | |
tree | 589043f63bdaac5cc64a4cc2511de052c89e00b4 /compiler | |
parent | dfbafff2e7cbadd28cade976520f86848a00a7c9 (diff) | |
download | Nim-4da8536701516f88cf2a04152abb8d8a276042d6.tar.gz |
fix compilation regression in alea
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/astalgo.nim | 2 | ||||
-rw-r--r-- | compiler/ccgtypes.nim | 2 | ||||
-rw-r--r-- | compiler/sighashes.nim | 12 |
3 files changed, 4 insertions, 12 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim index f8435f359..1fc8b7cea 100644 --- a/compiler/astalgo.nim +++ b/compiler/astalgo.nim @@ -81,6 +81,8 @@ template mdbg*: bool {.dirty.} = p.lex.fileIdx == gProjectMainIdx else: p.module.module.fileIdx == gProjectMainIdx + elif compiles(m.module.fileIdx): + m.module.fileIdx == gProjectMainIdx elif compiles(L.fileIdx): L.fileIdx == gProjectMainIdx else: diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index f1e32fd1e..5e4bcfe97 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -1094,7 +1094,7 @@ proc genDeepCopyProc(m: BModule; s: PSym; result: Rope) = proc genTypeInfo(m: BModule, t: PType): Rope = let origType = t - var t = skipTypes(origType, irrelevantForBackend) + var t = skipTypes(origType, irrelevantForBackend + tyUserTypeClasses) let sig = hashType(origType) result = m.typeInfoMarker.getOrDefault(sig) diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim index fd703a433..6eecf98d8 100644 --- a/compiler/sighashes.nim +++ b/compiler/sighashes.nim @@ -154,7 +154,7 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) = else: c.hashSym(t.sym) return - of tyAlias, tyGenericInst: + of tyAlias, tyGenericInst, tyUserTypeClasses: c.hashType t.lastSon, flags return else: @@ -201,16 +201,6 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) = of tyRef, tyPtr, tyGenericBody, tyVar: c.hashType t.lastSon, flags if tfVarIsPtr in t.flags: c &= ".varisptr" - of tyUserTypeClass: - if t.sym != nil and t.sym.owner != nil: - c &= t.sym.owner.name.s - else: - c &= "unknown typeclass" - of tyUserTypeClassInst: - let body = t.sons[0] - c.hashSym body.sym - for i in countup(1, sonsLen(t) - 2): - c.hashType t.sons[i], flags of tyFromExpr, tyFieldAccessor: c.hashTree(t.n) of tyTuple: |