3#if !defined(SYMS_DATA_STRUCTURES_C)
4#define SYMS_DATA_STRUCTURES_C
20 result = node->string;
57 node = node->bucket_next){
112 if (first + 1 >= opl){
158 if (index <
count && vals[index] == x){
183 if (
count > 0 && ranges[0].range.min <= x){
199 if (first + 1 >= opl){
269 loose->total_count += 1;
286 if (range.
min < range.
max){
296 if (range->
min < range->
max){
353 for (
SYMS_U64 i = 0; i < last; i += 1){
355 if (!
send_left && ranges[i].range.min == key){
374 else if (
count == 2){
375 if (ranges[0].range.min > ranges[1].
range.
min){
379 else if (
count == 3){
380 if (ranges[0].range.min > ranges[1].
range.
min){
383 if (ranges[1].range.min > ranges[2].
range.
min){
385 if (ranges[0].range.min > ranges[1].
range.
min){
390 else if (
count == 4){
391 if (ranges[0].range.min > ranges[1].
range.
min){
394 if (ranges[2].range.min > ranges[3].
range.
min){
397 if (ranges[0].range.min > ranges[2].
range.
min){
400 if (ranges[1].range.min > ranges[3].
range.
min){
403 if (ranges[1].range.min > ranges[2].
range.
min){
416 if (
loose->total_count > 0){
432 if (range.
min < range.
max){
448 if (range->
min < range->
max){
526 spatial_map.
ranges = ranges;
544 node = node->all_next){
577 result.
count = (opl - first)/8;
597 for (
SYMS_U64 i = 0; i < last; i += 1){
618 else if (
count == 2){
623 else if (
count == 3){
634 else if (
count == 4){
692 if (node->uid == uid && node->file_id == file_id){
694 if (result.
size == 0){
808 result.
files = files;
847 result.
files = files;
952 result = node->val[i];
1011 node = node->next_bucket){
1013 result = node->sid_array;
1036 if (
bucket->hash == hash &&
1112 result.
nodes = nodes;
1145 if (first + 1 >= opl){
1163 result = line_table->
line_array[first + index];
1202 if (file_ids->
count != 0){
1232 line_ptr->src_coord.file_id = index;
1264 for (
SYMS_U64 i = 0; i < seq_count; i += 1){
1332 if (
loose.count > 0){
1333 bucket_count = ((
loose.count + 1)*3/2) | 1;
1395 new_map->line_range_indexes = line_range_indexes;
1396 new_map->line_numbers = line_numbers;
1397 new_map->line_count = line_count;
1427 if (node->file_id == file_id){
1475 for (
SYMS_U64 i = 0; i < last; i += 1){
1491 else if (
count == 2){
1496 else if (
count == 3){
1507 else if (
count == 4){
1586 SYMS_ProfBegin(
"syms_index_from_n__u32__binary_search_round_up");
1609 if (first + 1 >= opl){
OODEFFUNC typedef const char int line
Definition oodle2.h:678
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
char * dst
Definition lz4.h:735
float v
Definition radaudio_mdct.cpp:62
Definition syms_data_structures.h:94
SYMS_U64 val
Definition syms_data_structures.h:96
Definition syms_base.h:402
Definition syms_data_structures.h:26
Definition syms_data_structures.h:34
SYMS_U64 count
Definition syms_data_structures.h:39
SYMS_DataIdxConsNode ** buckets
Definition syms_data_structures.h:35
SYMS_DataIdxConsNode * last
Definition syms_data_structures.h:38
SYMS_DataIdxConsNode * first
Definition syms_data_structures.h:37
SYMS_U64 bucket_count
Definition syms_data_structures.h:36
SYMS_U64 total_size
Definition syms_data_structures.h:40
Definition syms_data_structures.h:117
SYMS_U64 count
Definition syms_data_structures.h:119
SYMS_FileID2NameNode * buckets[SYMS_FILE_ID_TO_NAME_MAP_BUCKET_COUNT]
Definition syms_data_structures.h:118
Definition syms_data_structures.h:108
struct SYMS_FileID2NameNode * next
Definition syms_data_structures.h:109
Definition syms_debug_info.h:148
SYMS_FileID * ids
Definition syms_debug_info.h:149
SYMS_U64 count
Definition syms_debug_info.h:150
Definition syms_data_structures.h:265
SYMS_FileToLineToAddrLooseLine * first
Definition syms_data_structures.h:268
Definition syms_data_structures.h:259
SYMS_U32 line
Definition syms_data_structures.h:261
Definition syms_data_structures.h:274
Definition syms_data_structures.h:253
SYMS_FileToLineToAddrNode ** buckets
Definition syms_data_structures.h:254
SYMS_U64 bucket_count
Definition syms_data_structures.h:255
Definition syms_data_structures.h:247
Definition syms_data_structures.h:180
struct SYMS_IDMapNode * next
Definition syms_data_structures.h:181
SYMS_U64 key[SYMS_ID_MAP_NODE_CAP]
Definition syms_data_structures.h:183
void * val[SYMS_ID_MAP_NODE_CAP]
Definition syms_data_structures.h:184
SYMS_U64 count
Definition syms_data_structures.h:182
Definition syms_data_structures.h:187
SYMS_IDMapNode ** buckets
Definition syms_data_structures.h:188
SYMS_U64 bucket_count
Definition syms_data_structures.h:189
SYMS_U64 node_count
Definition syms_data_structures.h:190
Definition syms_debug_info.h:164
Definition syms_debug_info.h:153
SYMS_U64 line_count
Definition syms_debug_info.h:161
SYMS_Line * line_array
Definition syms_debug_info.h:160
SYMS_U64 * sequence_index_array
Definition syms_debug_info.h:157
SYMS_U64 sequence_count
Definition syms_debug_info.h:158
Definition syms_data_structures.h:237
SYMS_U64 line_count
Definition syms_data_structures.h:244
SYMS_U64Range * ranges
Definition syms_data_structures.h:238
SYMS_U32 * line_range_indexes
Definition syms_data_structures.h:242
SYMS_U32 * line_numbers
Definition syms_data_structures.h:243
Definition syms_debug_info.h:136
SYMS_U64 voff
Definition syms_debug_info.h:138
SYMS_SrcCoord src_coord
Definition syms_debug_info.h:137
Definition syms_debug_info.h:390
SYMS_LinkNameRec * recs
Definition syms_debug_info.h:391
SYMS_U64 count
Definition syms_debug_info.h:392
Definition syms_debug_info.h:385
SYMS_String8 name
Definition syms_debug_info.h:386
SYMS_U64 voff
Definition syms_debug_info.h:387
Definition syms_data_structures.h:157
SYMS_Name2FileIDMapUnitNode * first
Definition syms_data_structures.h:160
Definition syms_data_structures.h:139
SYMS_U64 unit_count
Definition syms_data_structures.h:142
Definition syms_data_structures.h:165
SYMS_U64 count
Definition syms_data_structures.h:168
SYMS_Name2FileIDMapFileNode * first
Definition syms_data_structures.h:166
SYMS_Name2FileIDMapFileNode * last
Definition syms_data_structures.h:167
Definition syms_data_structures.h:151
Definition syms_data_structures.h:134
SYMS_UnitID uid
Definition syms_data_structures.h:135
Definition syms_data_structures.h:145
SYMS_U64 file_count
Definition syms_data_structures.h:147
SYMS_Name2FileIDMapFile * files
Definition syms_data_structures.h:146
Definition syms_data_structures.h:78
Definition syms_data_structures.h:71
SYMS_U64 val
Definition syms_data_structures.h:75
SYMS_U64Range range
Definition syms_data_structures.h:73
SYMS_U64RangeArray ranges
Definition syms_data_structures.h:74
Definition syms_data_structures.h:59
SYMS_U64 val
Definition syms_data_structures.h:61
SYMS_U64Range range
Definition syms_data_structures.h:60
Definition syms_data_structures.h:65
SYMS_U64 count
Definition syms_data_structures.h:67
SYMS_SpatialMap1DRange * ranges
Definition syms_data_structures.h:66
Definition syms_data_structures.h:85
SYMS_U64 set_count
Definition syms_data_structures.h:91
SYMS_U8 * set_data
Definition syms_data_structures.h:90
SYMS_SpatialMap1D spatial_map
Definition syms_data_structures.h:86
SYMS_U64 * set_end_points
Definition syms_data_structures.h:88
SYMS_FileID file_id
Definition syms_debug_info.h:131
Definition syms_base.h:313
SYMS_String8 * strings
Definition syms_base.h:314
SYMS_U64 count
Definition syms_base.h:315
Definition syms_base.h:296
SYMS_U8 * str
Definition syms_base.h:297
SYMS_U64 size
Definition syms_base.h:298
Definition syms_data_structures.h:14
Definition syms_data_structures.h:20
SYMS_StringConsNode * buckets[SYMS_STRING_CONS_BUCKET_COUNT]
Definition syms_data_structures.h:21
Definition syms_debug_info.h:228
SYMS_SymbolID * ids
Definition syms_debug_info.h:229
SYMS_U64 count
Definition syms_debug_info.h:230
SYMS_U64 count
Definition syms_debug_info.h:225
SYMS_SymbolIDNode * last
Definition syms_debug_info.h:224
SYMS_SymbolIDNode * first
Definition syms_debug_info.h:223
Definition syms_debug_info.h:217
Definition syms_data_structures.h:226
SYMS_SymbolNameNodeLoose * first
Definition syms_data_structures.h:228
SYMS_SymbolNameNodeLoose * last
Definition syms_data_structures.h:229
SYMS_U64 node_count
Definition syms_data_structures.h:230
SYMS_SymbolNameNodeLoose * buckets[SYMS_SYMBOL_NAME_MAP_BUCKET_COUNT]
Definition syms_data_structures.h:227
Definition syms_data_structures.h:211
SYMS_U64 node_count
Definition syms_data_structures.h:214
SYMS_SymbolNameNode * nodes
Definition syms_data_structures.h:213
SYMS_SymbolNameNode * buckets[SYMS_SYMBOL_NAME_MAP_BUCKET_COUNT]
Definition syms_data_structures.h:212
Definition syms_data_structures.h:218
SYMS_U64 hash
Definition syms_data_structures.h:222
SYMS_SymbolIDList sid_list
Definition syms_data_structures.h:223
SYMS_String8 name
Definition syms_data_structures.h:221
Definition syms_data_structures.h:204
Definition syms_base.h:233
SYMS_U64 * u64
Definition syms_base.h:234
SYMS_U64 count
Definition syms_base.h:235
Definition syms_base.h:280
SYMS_U64Range * ranges
Definition syms_base.h:281
SYMS_U64 count
Definition syms_base.h:282
Definition syms_base.h:269
Definition syms_base.h:264
SYMS_U64 max
Definition syms_base.h:266
SYMS_U64 min
Definition syms_base.h:265
Definition syms_data_structures.h:46
SYMS_U64 * vals
Definition syms_data_structures.h:47
SYMS_U64 cap
Definition syms_data_structures.h:49
SYMS_U64 count
Definition syms_data_structures.h:48
SYMS_API SYMS_U64 syms_hash_u64(SYMS_U64 x)
Definition syms_base.c:57
SYMS_API void syms_arena_push_align(SYMS_Arena *arena, SYMS_U64 pow2_boundary)
Definition syms_base.c:664
SYMS_API SYMS_ArenaTemp syms_get_scratch(SYMS_Arena **conflicts, SYMS_U64 conflict_count)
Definition syms_base.c:694
SYMS_API SYMS_B32 syms_string_match(SYMS_String8 a, SYMS_String8 b, SYMS_StringMatchFlags flags)
Definition syms_base.c:210
SYMS_API void syms_u64_range_list_push(SYMS_Arena *arena, SYMS_U64RangeList *list, SYMS_U64Range range)
Definition syms_base.c:564
SYMS_API void syms_arena_put_back(SYMS_Arena *arena, SYMS_U64 amount)
Definition syms_base.c:672
SYMS_API SYMS_U64Range syms_make_u64_range(SYMS_U64 min, SYMS_U64 max)
Definition syms_base.c:18
SYMS_API SYMS_U64 syms_hash_djb2(SYMS_String8 string)
Definition syms_base.c:40
SYMS_API void syms_arena_temp_end(SYMS_ArenaTemp temp)
Definition syms_base.c:689
SYMS_API SYMS_String8 syms_push_string_copy(SYMS_Arena *arena, SYMS_String8 string)
Definition syms_base.c:353
SYMS_API SYMS_ArenaTemp syms_arena_temp_begin(SYMS_Arena *arena)
Definition syms_base.c:682
#define syms_true
Definition syms_base.h:105
#define SYMS_QueuePush_N(f, l, n, next)
Definition syms_base.h:210
#define SYMS_Swap(T, a, b)
Definition syms_base.h:190
#define SYMS_StackPush(f, n)
Definition syms_base.h:227
#define syms_push_array(a, T, c)
Definition syms_base.h:561
#define syms_memzero_struct(s)
Definition syms_base.h:161
#define SYMS_StackPush_N(f, n, next)
Definition syms_base.h:224
#define syms_false
Definition syms_base.h:104
#define SYMS_API
Definition syms_base.h:29
#define SYMS_ASSERT(x)
Definition syms_base.h:125
#define SYMS_INVARIANT(r, x)
Definition syms_base.h:138
SYMS_S32 SYMS_B32
Definition syms_base.h:99
#define syms_push_array_zero(a, T, c)
Definition syms_base.h:564
#define SYMS_U64_MAX
Definition syms_base.h:176
#define SYMS_QueuePush(f, l, n)
Definition syms_base.h:220
#define syms_release_scratch
Definition syms_base.h:567
uint32_t SYMS_U32
Definition syms_crt_overrides.h:38
uint64_t SYMS_U64
Definition syms_crt_overrides.h:39
#define syms_memmove
Definition syms_crt_overrides.h:65
#define SYMS_U64
Definition syms_crt_overrides.h:54
uint8_t SYMS_U8
Definition syms_crt_overrides.h:36
SYMS_API SYMS_IDMap syms_id_map_copy(SYMS_Arena *arena, SYMS_IDMap *map)
Definition syms_data_structures.c:897
SYMS_API SYMS_U64 syms_spatial_map_1d_binary_search(SYMS_SpatialMap1D *map, SYMS_U64 x)
Definition syms_data_structures.c:172
SYMS_API SYMS_B32 syms_spatial_map_1d_invariants(SYMS_SpatialMap1D *map)
Definition syms_data_structures.c:656
SYMS_API void syms_symbol_name_map_push(SYMS_Arena *arena, SYMS_SymbolNameMapLoose *map, SYMS_String8 name, SYMS_SymbolID sid)
Definition syms_data_structures.c:1024
SYMS_API void syms_line_to_addr_line_sort__rec(SYMS_FileToLineToAddrLooseLine **array, SYMS_U64 count)
Definition syms_data_structures.c:1464
SYMS_API SYMS_FileToLineToAddrMap syms_line_to_addr_map_from_line_table(SYMS_Arena *arena, SYMS_LineTable *line_table)
Definition syms_data_structures.c:1251
SYMS_API void syms_line_to_addr_line_sort(SYMS_FileToLineToAddrLooseLine **array, SYMS_U64 count)
Definition syms_data_structures.c:1457
SYMS_API void syms_spatial_map_1d_array_sort(SYMS_SpatialMap1DRange *ranges, SYMS_U64 count)
Definition syms_data_structures.c:334
SYMS_API SYMS_U64Set syms_u64_set_alloc(SYMS_Arena *arena, SYMS_U64 cap)
Definition syms_data_structures.c:89
SYMS_API SYMS_Name2FileIDMap syms_name_2_file_id_map_copy(SYMS_Arena *arena, SYMS_StringCons *cons, SYMS_Name2FileIDMap *map)
Definition syms_data_structures.c:776
SYMS_API SYMS_String8Array syms_string_array_copy(SYMS_Arena *arena, SYMS_StringCons *cons, SYMS_String8Array *array)
Definition syms_data_structures.c:1531
SYMS_API SYMS_U64 syms_line_index_from_voff__binary_search(SYMS_Line *lines, SYMS_U64 ender_index, SYMS_U64 voff)
Definition syms_data_structures.c:1126
SYMS_API SYMS_B32 syms_u64_set_insert(SYMS_U64Set *set, SYMS_U64 x)
Definition syms_data_structures.c:135
SYMS_API SYMS_SymbolNameMap syms_symbol_name_map_bake(SYMS_Arena *arena, SYMS_SymbolNameMapLoose *loose)
Definition syms_data_structures.c:1065
SYMS_API void syms_id_map_insert(SYMS_Arena *arena, SYMS_IDMap *map, SYMS_U64 key, void *val)
Definition syms_data_structures.c:974
SYMS_API SYMS_U64 syms_index_from_n__u32__binary_search_round_up(SYMS_U32 *v, SYMS_U64 count, SYMS_U32 n)
Definition syms_data_structures.c:1585
SYMS_API SYMS_LineTable syms_line_table_with_indexes_from_parse(SYMS_Arena *arena, SYMS_LineParseOut *parse)
Definition syms_data_structures.c:1240
SYMS_API SYMS_SymbolIDArray syms_symbol_name_map_array_from_string(SYMS_SymbolNameMap *map, SYMS_String8 string)
Definition syms_data_structures.c:1004
SYMS_API void syms_u64_set_erase(SYMS_U64Set *set, SYMS_U64 x)
Definition syms_data_structures.c:153
SYMS_API SYMS_B32 syms_spatial_map_1d_array_check_sorted(SYMS_SpatialMap1DRange *ranges, SYMS_U64 count)
Definition syms_data_structures.c:319
SYMS_API SYMS_U64RangeArray syms_line_to_addr_map_lookup_nearest_line_number(SYMS_LineToAddrMap *map, SYMS_U32 line, SYMS_U32 *actual_line_out)
Definition syms_data_structures.c:1437
SYMS_API SYMS_U64 syms_spatial_map_1d_index_from_point(SYMS_SpatialMap1D *map, SYMS_U64 x)
Definition syms_data_structures.c:211
SYMS_API SYMS_LineToAddrMap * syms_line_to_addr_map_lookup_file_id(SYMS_FileToLineToAddrMap *map, SYMS_FileID file_id)
Definition syms_data_structures.c:1420
SYMS_API SYMS_FileID2NameMap syms_file_id_2_name_map_copy(SYMS_Arena *arena, SYMS_StringCons *cons, SYMS_FileID2NameMap *map)
Definition syms_data_structures.c:706
SYMS_API SYMS_Name2FileIDMap syms_name_2_file_id_map_bake(SYMS_Arena *arena, SYMS_Name2FileIDMapLoose *loose)
Definition syms_data_structures.c:819
SYMS_API void syms_line_table_rewrite_file_ids_in_place(SYMS_FileIDArray *file_ids, SYMS_LineTable *line_table)
Definition syms_data_structures.c:1198
SYMS_API void syms_spatial_map_1d_array_sort__rec(SYMS_SpatialMap1DRange *ranges, SYMS_U64 count)
Definition syms_data_structures.c:341
SYMS_API void syms_name_2_file_id_map_loose_push(SYMS_Arena *arena, SYMS_Name2FileIDMapLoose *map, SYMS_String8 name_cons, SYMS_UnitID uid, SYMS_FileID file_id)
Definition syms_data_structures.c:856
SYMS_API void syms_spatial_map_1d_loose_push(SYMS_Arena *arena, SYMS_SpatialMap1DLoose *loose, SYMS_U64 val, SYMS_U64RangeArray ranges)
Definition syms_data_structures.c:251
SYMS_API SYMS_String8 syms_string_cons(SYMS_Arena *arena, SYMS_StringCons *cons, SYMS_String8 string)
Definition syms_data_structures.c:10
SYMS_API SYMS_LinkNameRecArray syms_link_name_record_copy(SYMS_Arena *arena, SYMS_LinkNameRecArray *array)
Definition syms_data_structures.c:1564
SYMS_API SYMS_U64 syms_file_id_2_name_map_hash(SYMS_UnitID uid, SYMS_FileID file_id)
Definition syms_data_structures.c:677
SYMS_API SYMS_DataIdxCons syms_data_idx_cons_alloc(SYMS_Arena *arena, SYMS_U64 bucket_count)
Definition syms_data_structures.c:41
SYMS_API SYMS_U64Array syms_spatial_multi_map_1d_array_from_point(SYMS_SpatialMultiMap1D *map, SYMS_U64 x)
Definition syms_data_structures.c:567
SYMS_API void * syms_id_map_ptr_from_u64(SYMS_IDMap *map, SYMS_U64 key)
Definition syms_data_structures.c:939
SYMS_API void syms_spatial_map_1d_endpoint_sort(SYMS_1DEndPoint *endpoints, SYMS_U64 count)
Definition syms_data_structures.c:585
SYMS_API void syms_file_id_2_name_map_insert(SYMS_Arena *arena, SYMS_FileID2NameMap *map, SYMS_UnitID uid, SYMS_FileID file_id, SYMS_String8 name)
Definition syms_data_structures.c:754
SYMS_API SYMS_U64 syms_spatial_map_1d_value_from_point(SYMS_SpatialMap1D *map, SYMS_U64 x)
Definition syms_data_structures.c:226
SYMS_API SYMS_Line syms_line_from_sequence_voff(SYMS_LineTable *line_table, SYMS_U64 seq_number, SYMS_U64 voff)
Definition syms_data_structures.c:1156
SYMS_API void syms_spatial_map_1d_loose_push_single(SYMS_Arena *arena, SYMS_SpatialMap1DLoose *loose, SYMS_U64 val, SYMS_U64Range range)
Definition syms_data_structures.c:262
SYMS_API SYMS_SpatialMap1D syms_spatial_map_1d_bake(SYMS_Arena *arena, SYMS_SpatialMap1DLoose *loose)
Definition syms_data_structures.c:273
SYMS_API SYMS_SpatialMap1D syms_spatial_map_1d_copy(SYMS_Arena *arena, SYMS_SpatialMap1D *map)
Definition syms_data_structures.c:240
SYMS_API SYMS_U64 syms_data_idx_cons(SYMS_Arena *arena, SYMS_DataIdxCons *cons, SYMS_String8 data)
Definition syms_data_structures.c:49
SYMS_API SYMS_U64 syms_u64_set__bs(SYMS_U64Set *set, SYMS_U64 x)
Definition syms_data_structures.c:97
SYMS_API SYMS_SpatialMultiMap1D syms_spatial_multi_map_1d_bake(SYMS_Arena *arena, SYMS_SpatialMap1DLoose *loose)
Definition syms_data_structures.c:412
SYMS_API SYMS_LineTable syms_line_table_copy(SYMS_Arena *arena, SYMS_LineTable *line_table)
Definition syms_data_structures.c:1171
SYMS_API SYMS_String8 syms_file_id_2_name_map_name_from_id(SYMS_FileID2NameMap *buckets, SYMS_UnitID uid, SYMS_FileID file_id)
Definition syms_data_structures.c:684
SYMS_API SYMS_IDMap syms_id_map_alloc(SYMS_Arena *arena, SYMS_U64 bucket_count)
Definition syms_data_structures.c:966
#define SYMS_STRING_CONS_BUCKET_COUNT
Definition syms_data_structures.h:12
#define SYMS_FILE_ID_TO_NAME_MAP_BUCKET_COUNT
Definition syms_data_structures.h:106
#define SYMS_ID_MAP_NODE_CAP
Definition syms_data_structures.h:178
#define SYMS_SYMBOL_NAME_MAP_BUCKET_COUNT
Definition syms_data_structures.h:202
SYMS_U64 SYMS_UnitID
Definition syms_debug_info.h:77
SYMS_U64 SYMS_FileID
Definition syms_debug_info.h:128
SYMS_U64 SYMS_SymbolID
Definition syms_debug_info.h:215
#define SYMS_Arena
Definition syms_default_arena.h:61
#define SYMS_ProfEnd()
Definition syms_dev.h:212
#define SYMS_ProfBegin(str)
Definition syms_dev.h:209
SYMS_READ_ONLY SYMS_GLOBAL SYMS_LineToAddrMap syms_line_to_addr_map_nil
Definition syms_group.h:112