eliminate old architecture info tables

This commit is contained in:
Ryan Fleury
2024-08-07 16:48:20 -07:00
parent 6563cb9e2c
commit 18237a1464
4 changed files with 0 additions and 2248 deletions
-53
View File
@@ -5704,43 +5704,6 @@ df_current_path(void)
return df_state->current_path;
}
//- rjf: architecture info table lookups
internal String8
df_info_summary_from_string__x64(String8 string)
{
String8 result = {0};
{
U64 hash = df_hash_from_string__case_insensitive(string);
U64 slot_idx = hash % df_state->arch_info_x64_table_size;
DF_ArchInfoSlot *slot = &df_state->arch_info_x64_table[slot_idx];
for(DF_ArchInfoNode *n = slot->first; n != 0; n = n->hash_next)
{
if(str8_match(n->key, string, StringMatchFlag_CaseInsensitive))
{
result = n->val;
break;
}
}
}
return result;
}
internal String8
df_info_summary_from_string(Architecture arch, String8 string)
{
String8 result = {0};
switch(arch)
{
default:{}break;
case Architecture_x64:
{
result = df_info_summary_from_string__x64(string);
}break;
}
return result;
}
//- rjf: entity kind cache
internal DF_EntityList
@@ -6266,22 +6229,6 @@ df_core_init(CmdLine *cmdln, DF_StateDeltaHistory *hist)
df_state->current_path = push_str8_copy(df_state->current_path_arena, current_path_with_slash);
scratch_end(scratch);
}
// rjf: set up architecture info tables
df_state->arch_info_x64_table_size = 1024;
df_state->arch_info_x64_table = push_array(df_state->arena, DF_ArchInfoSlot, df_state->arch_info_x64_table_size);
for(U64 idx = 0; idx < ArrayCount(df_g_inst_table_x64); idx += 1)
{
String8 key = df_g_inst_table_x64[idx].mnemonic;
String8 val = df_g_inst_table_x64[idx].summary;
U64 hash = df_hash_from_string__case_insensitive(key);
U64 slot_idx = hash % df_state->arch_info_x64_table_size;
DF_ArchInfoSlot *slot = &df_state->arch_info_x64_table[slot_idx];
DF_ArchInfoNode *n = push_array(df_state->arena, DF_ArchInfoNode, 1);
SLLQueuePush_N(slot->first, slot->last, n, hash_next);
n->key = key;
n->val = val;
}
}
internal DF_CmdList
-25
View File
@@ -1086,23 +1086,6 @@ struct DF_StateDeltaHistory
////////////////////////////////
//~ rjf: Main State Types
//- rjf: architecture info table types
typedef struct DF_ArchInfoNode DF_ArchInfoNode;
struct DF_ArchInfoNode
{
DF_ArchInfoNode *hash_next;
String8 key;
String8 val;
};
typedef struct DF_ArchInfoSlot DF_ArchInfoSlot;
struct DF_ArchInfoSlot
{
DF_ArchInfoNode *first;
DF_ArchInfoNode *last;
};
//- rjf: name allocator types
typedef struct DF_NameChunkNode DF_NameChunkNode;
@@ -1225,10 +1208,6 @@ struct DF_State
// rjf: current path
Arena *current_path_arena;
String8 current_path;
// rjf: architecture info tables
U64 arch_info_x64_table_size;
DF_ArchInfoSlot *arch_info_x64_table;
};
////////////////////////////////
@@ -1666,10 +1645,6 @@ internal void df_cfg_push_write_string(DF_CfgSrc src, String8 string);
//- rjf: current path
internal String8 df_current_path(void);
//- rjf: architecture info table lookups
internal String8 df_info_summary_from_string__x64(String8 string);
internal String8 df_info_summary_from_string(Architecture arch, String8 string);
//- rjf: entity kind cache
internal DF_EntityList df_query_cached_entity_list_with_kind(DF_EntityKind kind);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff