Begin work on separating int and word sizes (i.e. size_of(int) might not equal size_of(uintptr))

This commit is contained in:
gingerBill
2023-04-20 11:46:41 +01:00
parent b2b88f1d99
commit 84f966cb8f
5 changed files with 81 additions and 61 deletions
+3 -3
View File
@@ -184,7 +184,7 @@ map_cell_index_static :: #force_inline proc "contextless" (cells: [^]Map_Cell($T
// len() for map
@(require_results)
map_len :: #force_inline proc "contextless" (m: Raw_Map) -> int {
return m.len
return int(m.len)
}
// cap() for map
@@ -207,8 +207,8 @@ map_load_factor :: #force_inline proc "contextless" (log2_capacity: uintptr) ->
}
@(require_results)
map_resize_threshold :: #force_inline proc "contextless" (m: Raw_Map) -> int {
return int(map_load_factor(map_log2_cap(m)))
map_resize_threshold :: #force_inline proc "contextless" (m: Raw_Map) -> uintptr {
return map_load_factor(map_log2_cap(m))
}
// The data stores the log2 capacity in the lower six bits. This is primarily