mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 13:28:40 +00:00
clean up HashTable, removed unused command line switches, added
list wrapper for alt names, added natvis for HashTable, AltNameList, MergeDirectiveList, and IncludeSymbolList
This commit is contained in:
committed by
Ryan Fleury
parent
6a3d7e65f3
commit
56c43ad614
+25
-25
@@ -39,22 +39,20 @@ typedef struct HashTable
|
||||
BucketList free_buckets;
|
||||
} HashTable;
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
//- bucket list helpers
|
||||
// --- Bucket List -------------------------------------------------------------
|
||||
|
||||
internal void bucket_list_concat_in_place(BucketList *list, BucketList *to_concat);
|
||||
internal BucketNode * bucket_list_pop(BucketList *list);
|
||||
internal BucketNode * bucket_list_pop (BucketList *list);
|
||||
|
||||
//- main
|
||||
// --- Hash Table --------------------------------------------------------------
|
||||
|
||||
internal U64 hash_table_hasher(String8 string);
|
||||
internal HashTable * hash_table_init(Arena *arena, U64 cap);
|
||||
internal U64 hash_table_hasher(String8 string);
|
||||
|
||||
internal HashTable * hash_table_init (Arena *arena, U64 cap);
|
||||
internal void hash_table_purge(HashTable *ht);
|
||||
|
||||
//- push
|
||||
internal BucketNode * hash_table_push(Arena *arena, HashTable *ht, U64 hash, KeyValuePair kv);
|
||||
|
||||
internal BucketNode * hash_table_push (Arena *arena, HashTable *ht, U64 hash, KeyValuePair v);
|
||||
internal BucketNode * hash_table_push_u32_string (Arena *arena, HashTable *ht, U32 key, String8 value);
|
||||
internal BucketNode * hash_table_push_u64_string (Arena *arena, HashTable *ht, U64 key, String8 value);
|
||||
internal BucketNode * hash_table_push_string_string(Arena *arena, HashTable *ht, String8 key, String8 value);
|
||||
@@ -66,35 +64,37 @@ internal BucketNode * hash_table_push_path_u64 (Arena *arena, HashTable *ht,
|
||||
internal BucketNode * hash_table_push_u64_u64 (Arena *arena, HashTable *ht, U64 key, U64 value);
|
||||
internal BucketNode * hash_table_push_u32_u32 (Arena *arena, HashTable *ht, U32 key, U32 value);
|
||||
|
||||
//- search
|
||||
internal KeyValuePair * hash_table_search_string (HashTable *ht, String8 key);
|
||||
internal KeyValuePair * hash_table_search_u32 (HashTable *ht, U32 key);
|
||||
internal KeyValuePair * hash_table_search_u64 (HashTable *ht, U64 key);
|
||||
internal KeyValuePair * hash_table_search_path (HashTable *ht, String8 key);
|
||||
internal KeyValuePair * hash_table_search_raw (HashTable *ht, void *key);
|
||||
|
||||
internal KeyValuePair * hash_table_search_string (HashTable *ht, String8 string);
|
||||
internal KeyValuePair * hash_table_search_u32 (HashTable *ht, U32 key );
|
||||
internal KeyValuePair * hash_table_search_u64 (HashTable *ht, U64 key );
|
||||
internal KeyValuePair * hash_table_search_path (HashTable *ht, String8 path );
|
||||
internal void * hash_table_search_path_raw(HashTable *ht, String8 path );
|
||||
|
||||
internal B32 hash_table_search_path_u64(HashTable *ht, String8 key, U64 *value_out);
|
||||
internal B32 hash_table_search_string_u64(HashTable *ht, String8 key, U64 *value_out);
|
||||
internal B32 hash_table_search_string_raw(HashTable *ht, String8 key, void *value_out);
|
||||
internal B32 hash_table_search_path_u64 (HashTable *ht, String8 key, U64 *value_out);
|
||||
internal B32 hash_table_search_string_u64 (HashTable *ht, String8 key, U64 *value_out);
|
||||
internal B32 hash_table_search_string_string(HashTable *ht, String8 key, String8 *value_out);
|
||||
internal B32 hash_table_search_u32_u32(HashTable *ht, U32 key, U32 *value_out);
|
||||
internal B32 hash_table_search_u32_u32 (HashTable *ht, U32 key, U32 *value_out);
|
||||
|
||||
//- key-value helpers
|
||||
internal void * hash_table_search_string_raw(HashTable *ht, String8 key);
|
||||
internal void * hash_table_search_u64_raw (HashTable *ht, U64 key);
|
||||
internal void * hash_table_search_path_raw (HashTable *ht, String8 key);
|
||||
internal void * hash_table_search_raw_raw (HashTable *ht, void *key);
|
||||
|
||||
// --- Key Value Helpers -------------------------------------------------------
|
||||
|
||||
internal U32 * keys_from_hash_table_u32 (Arena *arena, HashTable *ht);
|
||||
internal U64 * keys_from_hash_table_u64 (Arena *arena, HashTable *ht);
|
||||
internal String8 keys_from_hash_table_str8 (Arena *arena, HashTable *ht);
|
||||
internal KeyValuePair * key_value_pairs_from_hash_table(Arena *arena, HashTable *ht);
|
||||
|
||||
internal void * keys_from_hash_table_raw(Arena *arena, HashTable *ht);
|
||||
internal void * keys_from_hash_table_raw (Arena *arena, HashTable *ht);
|
||||
internal void * values_from_hash_table_raw(Arena *arena, HashTable *ht);
|
||||
|
||||
internal void sort_key_value_pairs_as_u32(KeyValuePair *pairs, U64 count);
|
||||
internal void sort_key_value_pairs_as_u64(KeyValuePair *pairs, U64 count);
|
||||
internal void sort_key_value_pairs_as_u32 (KeyValuePair *pairs, U64 count);
|
||||
internal void sort_key_value_pairs_as_u64 (KeyValuePair *pairs, U64 count);
|
||||
internal void sort_key_value_pairs_as_string_sensitive(KeyValuePair *pairs, U64 count);
|
||||
|
||||
////////////////////////////////
|
||||
// --- Misc --------------------------------------------------------------------
|
||||
|
||||
internal U64Array remove_duplicates_u64_array(Arena *arena, U64Array arr);
|
||||
internal String8List remove_duplicates_str8_list(Arena *arena, String8List list);
|
||||
|
||||
Reference in New Issue
Block a user