intrinsics.type_* constant evaluation procedures

This commit is contained in:
gingerBill
2019-08-04 11:02:00 +01:00
parent 5877017d30
commit 37633c1d2a
5 changed files with 739 additions and 220 deletions

View File

@@ -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: