bug fix in sym body hash (#11127)
This commit is contained in:
parent
98002149a8
commit
da3b649539
1 changed files with 2 additions and 2 deletions
|
|
@ -349,7 +349,7 @@ proc hashBodyTree(graph: ModuleGraph, c: var MD5Context, n: PNode) =
|
||||||
c &= n.strVal
|
c &= n.strVal
|
||||||
else:
|
else:
|
||||||
for i in 0..<n.len:
|
for i in 0..<n.len:
|
||||||
hashTree(c, n.sons[i])
|
hashBodyTree(graph, c, n.sons[i])
|
||||||
|
|
||||||
proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash =
|
proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash =
|
||||||
## compute unique digest of the proc/func/method symbols
|
## compute unique digest of the proc/func/method symbols
|
||||||
|
|
@ -369,7 +369,7 @@ proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash =
|
||||||
if sym.ast != nil:
|
if sym.ast != nil:
|
||||||
md5Init(c)
|
md5Init(c)
|
||||||
c.md5Update(cast[cstring](result.addr), sizeof(result))
|
c.md5Update(cast[cstring](result.addr), sizeof(result))
|
||||||
c.hashTree(sym.ast[bodyPos])
|
hashBodyTree(graph, c, sym.ast[bodyPos])
|
||||||
c.md5Final(result.Md5Digest)
|
c.md5Final(result.Md5Digest)
|
||||||
graph.symBodyHashes[sym.id] = result
|
graph.symBodyHashes[sym.id] = result
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue