sighashes: do not use the ID mechanism at all
This commit is contained in:
parent
d1663ca81c
commit
71a23fbbb7
3 changed files with 56 additions and 11 deletions
|
|
@ -175,6 +175,8 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
|
|||
c.hashType s.typ, flags
|
||||
else:
|
||||
c &= t.id
|
||||
if t.len > 0 and t.sons[0] != nil:
|
||||
hashType c, t.sons[0], flags
|
||||
of tyRef, tyPtr, tyGenericBody, tyVar:
|
||||
c.hashType t.lastSon, flags
|
||||
if tfVarIsPtr in t.flags: c &= ".varisptr"
|
||||
|
|
@ -267,6 +269,17 @@ proc hashProc*(s: PSym): SigHash =
|
|||
#c &= s.info.line
|
||||
md5Final c, result.Md5Digest
|
||||
|
||||
proc hashNonProc*(s: PSym): SigHash =
|
||||
var c: MD5Context
|
||||
md5Init c
|
||||
hashSym(c, s)
|
||||
var it = s
|
||||
while it != nil:
|
||||
c &= it.name.s
|
||||
c &= "."
|
||||
it = it.owner
|
||||
md5Final c, result.Md5Digest
|
||||
|
||||
proc hashOwner*(s: PSym): SigHash =
|
||||
var c: MD5Context
|
||||
md5Init c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue