aboutsummaryrefslogtreecommitdiff
path: root/src/exact_value.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-04-13 13:02:30 +0100
committergingerBill <bill@gingerbill.org>2020-04-13 13:02:30 +0100
commitf09b6a4c90805a562b2252430f844e85d06f1ee1 (patch)
tree39555c6b9503685c71fd969034ddd5614bfdc357 /src/exact_value.cpp
parent65a2125dba5652577588afee31d7333f13eb0c31 (diff)
Simplify compiler's `Map` and create a `StringMap` specifically for strings
Diffstat (limited to 'src/exact_value.cpp')
-rw-r--r--src/exact_value.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp
index f4d2e60de..1473319cc 100644
--- a/src/exact_value.cpp
+++ b/src/exact_value.cpp
@@ -69,7 +69,10 @@ HashKey hash_exact_value(ExactValue v) {
case ExactValue_Bool:
return hash_integer(u64(v.value_bool));
case ExactValue_String:
- return hash_string(v.value_string);
+ {
+ char const *str = string_intern(v.value_string);
+ return hash_pointer(str);
+ }
case ExactValue_Integer:
{
HashKey key = hashing_proc(big_int_ptr(&v.value_integer), v.value_integer.len * gb_size_of(u64));