diff options
| author | gingerBill <bill@gingerbill.org> | 2019-08-04 11:02:00 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-08-04 11:02:00 +0100 |
| commit | 37633c1d2a9cc2ab5ae659ffb359f7f56f0457a2 (patch) | |
| tree | 1874f86dfc5cb3b04238926822cfe11c3bbb65da /src/exact_value.cpp | |
| parent | 5877017d30999388c832f6467116336733b607e2 (diff) | |
`intrinsics.type_*` constant evaluation procedures
Diffstat (limited to 'src/exact_value.cpp')
| -rw-r--r-- | src/exact_value.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp index 428690291..7d822512b 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -53,14 +53,8 @@ HashKey hash_exact_value(ExactValue v) { return hash_integer(u64(v.value_bool)); case ExactValue_String: return hash_string(v.value_string); - case ExactValue_Integer: { - u64 *d = big_int_ptr(&v.value_integer); - u64 x = 0; - for (i32 i = 0; i < v.value_integer.len; i++) { - x |= d[i]; - } - return hash_integer(x); - } + case ExactValue_Integer: + return hashing_proc(big_int_ptr(&v.value_integer), v.value_integer.len * gb_size_of(u64)); case ExactValue_Float: return hash_f64(v.value_float); case ExactValue_Pointer: |