Begin work on map static set

This commit is contained in:
gingerBill
2022-11-11 14:45:22 +00:00
parent d2701d8b13
commit 16fc961010
10 changed files with 218 additions and 42 deletions
+1 -3
View File
@@ -696,9 +696,7 @@ __dynamic_map_check_grow :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info:
}
// IMPORTANT: USED WITHIN THE COMPILER
__dynamic_map_set :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^Map_Info, key, value: rawptr, loc := #caller_location) -> rawptr {
hash := info.key_hasher(key, 0)
__dynamic_map_set :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^Map_Info, hash: Map_Hash, key, value: rawptr, loc := #caller_location) -> rawptr {
if found := __dynamic_map_get(m, info, hash, key); found != nil {
intrinsics.mem_copy_non_overlapping(found, value, info.vs.size_of_type)
return found