diff --git a/compiler/treetab.nim b/compiler/treetab.nim index 1fd539f0f2..b8b0f7b191 100644 --- a/compiler/treetab.nim +++ b/compiler/treetab.nim @@ -21,20 +21,13 @@ proc hashTree*(n: PNode): Hash = return result = ord(n.kind) case n.kind - of nkEmpty, nkNilLit, nkType: - discard - of nkIdent: - result = result !& n.ident.h - of nkSym: - result = result !& n.sym.id - of nkCharLit..nkUInt64Lit: - if (n.intVal >= low(int)) and (n.intVal <= high(int)): - result = result !& int(n.intVal) - of nkFloatLit..nkFloat64Lit: - if (n.floatVal >= - 1000000.0) and (n.floatVal <= 1000000.0): - result = result !& toInt(n.floatVal) - of nkStrLit..nkTripleStrLit: - result = result !& hash(n.strVal) + of nkEmpty: discard + of nkSym: result = result !& n.sym.id + of nkIdent: result = result !& n.ident.h + of nkCharLit..nkUInt64Lit: result = result !& hash(n.intVal) + of nkFloatLit..nkFloat64Lit: result = result !& hash(cast[uint64](n.floatVal)) + of nkStrLit..nkTripleStrLit: result = result !& hash(n.strVal) + of nkType, nkNilLit: result = result !& hash(n.typ.itemId) else: for i in 0..