diff options
| author | gingerBill <bill@gingerbill.org> | 2023-01-14 13:23:17 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-01-14 13:23:17 +0000 |
| commit | 518f30e52307e12fe184c34f0da8f197b976ced5 (patch) | |
| tree | 3f5db726b8ece6f07b7c1147c56f954615048765 /src/check_type.cpp | |
| parent | 868aa4c14ab6c63b9b797f4a8178c73b69897711 (diff) | |
Bring `PtrMap` inline with `StringMap`
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 9ce6585f2..0bd9af15f 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2201,18 +2201,18 @@ gb_internal Type *make_optional_ok_type(Type *value, bool typed) { // IMPORTANT NOTE(bill): This must match the definition in dynamic_map_internal.odin enum : i64 { - MAP_CACHE_LINE_LOG2 = 6, - MAP_CACHE_LINE_SIZE = 1 << MAP_CACHE_LINE_LOG2 + MAP_CELL_CACHE_LINE_LOG2 = 6, + MAP_CELL_CACHE_LINE_SIZE = 1 << MAP_CELL_CACHE_LINE_LOG2, }; -GB_STATIC_ASSERT(MAP_CACHE_LINE_SIZE >= 64); +GB_STATIC_ASSERT(MAP_CELL_CACHE_LINE_SIZE >= 64); gb_internal void map_cell_size_and_len(Type *type, i64 *size_, i64 *len_) { i64 elem_sz = type_size_of(type); i64 len = 1; - if (0 < elem_sz && elem_sz < MAP_CACHE_LINE_SIZE) { - len = MAP_CACHE_LINE_SIZE / elem_sz; + if (0 < elem_sz && elem_sz < MAP_CELL_CACHE_LINE_SIZE) { + len = MAP_CELL_CACHE_LINE_SIZE / elem_sz; } - i64 size = align_formula(elem_sz * len, MAP_CACHE_LINE_SIZE); + i64 size = align_formula(elem_sz * len, MAP_CELL_CACHE_LINE_SIZE); if (size_) *size_ = size; if (len_) *len_ = len; } |