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
+4 -1
View File
@@ -42,7 +42,8 @@ Platform_Endianness :: enum u8 {
Big = 2,
}
Equal_Proc :: distinct proc "contextless" (rawptr, rawptr) -> bool;
Equal_Proc :: distinct proc "contextless" (rawptr, rawptr) -> bool;
Hasher_Proc :: distinct proc "contextless" (data: rawptr, seed: uintptr) -> uintptr;
Type_Info_Struct_Soa_Kind :: enum u8 {
None = 0,
@@ -125,6 +126,8 @@ Type_Info_Map :: struct {
key: ^Type_Info,
value: ^Type_Info,
generated_struct: ^Type_Info,
key_equal: Equal_Proc,
key_hasher: Hasher_Proc,
};
Type_Info_Bit_Field :: struct {
names: []string,