aboutsummaryrefslogtreecommitdiff
path: root/core/runtime
diff options
context:
space:
mode:
authorjason <jkercher43@gmail.com>2023-05-17 00:06:31 -0400
committerjason <jkercher43@gmail.com>2023-05-17 00:06:31 -0400
commitb2645b32014b57003f80ff9dde841c2be94d44ca (patch)
treeeaf3e804b4600314bb14cb61dd6b3eb9d77885d1 /core/runtime
parenta9936d15708030b146cfb1fff13d7d52dcb2f789 (diff)
add rehash to map_shrink_dynamic
Diffstat (limited to 'core/runtime')
-rw-r--r--core/runtime/dynamic_map_internal.odin1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/runtime/dynamic_map_internal.odin b/core/runtime/dynamic_map_internal.odin
index 188d6343e..fe4690610 100644
--- a/core/runtime/dynamic_map_internal.odin
+++ b/core/runtime/dynamic_map_internal.odin
@@ -610,6 +610,7 @@ map_shrink_dynamic :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^Map_I
k := map_cell_index_dynamic(ks, info.ks, i)
v := map_cell_index_dynamic(vs, info.vs, i)
+ hash = info.key_hasher(rawptr(k), map_seed(shrunk))
_ = map_insert_hash_dynamic(&shrunk, info, hash, k, v)
// Only need to do this comparison on each actually added pair, so do not
// fold it into the for loop comparator as a micro-optimization.