From 5a66dfad2a9662cece4f2c52de66ba8ed3c99796 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 27 May 2021 09:38:21 +0100 Subject: [PATCH] change parameter::hash so that the least significant bits arent overriden the 3rd bit was being stuck by the parameter kind, leading to increased number of hash collisions --- src/ast/ast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index d64cb92de..c564acba3 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -102,7 +102,7 @@ unsigned parameter::hash() const { case PARAM_ZSTRING: b = get_zstring().hash(); break; case PARAM_EXTERNAL: b = get_ext_id(); break; } - return (b << 2) | get_kind(); + return b; } std::ostream& parameter::display(std::ostream& out) const {