diff options
author | cooldome <cdome@bk.ru> | 2019-04-27 14:31:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-27 14:31:05 +0100 |
commit | da3b649539c856fb9126d28f4354bf0170b363ad (patch) | |
tree | 9154773da9ab62213cfce0091c155d72bdcfeb8b | |
parent | 98002149a8a5521ba8bd3f51fe5c50206ee7f0f1 (diff) | |
download | Nim-da3b649539c856fb9126d28f4354bf0170b363ad.tar.gz |
bug fix in sym body hash (#11127)
-rw-r--r-- | compiler/sighashes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim index 8e4458942..c69d58cd3 100644 --- a/compiler/sighashes.nim +++ b/compiler/sighashes.nim @@ -349,7 +349,7 @@ proc hashBodyTree(graph: ModuleGraph, c: var MD5Context, n: PNode) = c &= n.strVal else: for i in 0..<n.len: - hashTree(c, n.sons[i]) + hashBodyTree(graph, c, n.sons[i]) proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash = ## compute unique digest of the proc/func/method symbols @@ -369,7 +369,7 @@ proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash = if sym.ast != nil: md5Init(c) c.md5Update(cast[cstring](result.addr), sizeof(result)) - c.hashTree(sym.ast[bodyPos]) + hashBodyTree(graph, c, sym.ast[bodyPos]) c.md5Final(result.Md5Digest) graph.symBodyHashes[sym.id] = result |