Add intrinsics.type_hasher_proc; Make map work with generic hasher procedure

This commit is contained in:
gingerBill
2020-11-29 15:27:53 +00:00
parent 085972bb2c
commit 97c66c9c73
11 changed files with 338 additions and 99 deletions
+6 -2
View File
@@ -729,9 +729,13 @@ void init_universal(void) {
{
void set_procedure_abi_types(Type *type);
Type *args[2] = {t_rawptr, t_rawptr};
t_equal_proc = alloc_type_proc_from_types(args, 2, t_bool, false, ProcCC_Contextless);
Type *equal_args[2] = {t_rawptr, t_rawptr};
t_equal_proc = alloc_type_proc_from_types(equal_args, 2, t_bool, false, ProcCC_Contextless);
set_procedure_abi_types(t_equal_proc);
Type *hasher_args[2] = {t_rawptr, t_uintptr};
t_hasher_proc = alloc_type_proc_from_types(hasher_args, 2, t_uintptr, false, ProcCC_Contextless);
set_procedure_abi_types(t_hasher_proc);
}
// Constants