move over all expansion view rules to new eval-system lookup hooks; eliminate most of old hooks

This commit is contained in:
Ryan Fleury
2025-02-01 17:37:24 -08:00
parent b1829af8c6
commit aac93b5952
16 changed files with 810 additions and 752 deletions
+15 -9
View File
@@ -4,17 +4,17 @@
////////////////////////////////
//~ rjf: Entity Kinds
@table(name display_string)
@table(name code_name display_string)
CTRL_EntityKindTable:
{
{Root "Root" }
{Machine "Machine" }
{Process "Process" }
{Thread "Thread" }
{Module "Module" }
{EntryPoint "Entry Point" }
{DebugInfoPath "Debug Info Path" }
{PendingThreadName "Pending Thread Name" }
{Root root "Root" }
{Machine machine "Machine" }
{Process process "Process" }
{Thread thread "Thread" }
{Module module "Module" }
{EntryPoint entry_point "Entry Point" }
{DebugInfoPath debug_info_path "Debug Info Path" }
{PendingThreadName pending_thread_name "Pending Thread Name" }
}
@enum CTRL_EntityKind:
@@ -24,6 +24,12 @@ CTRL_EntityKindTable:
COUNT,
}
@data(String8) ctrl_entity_kind_code_name_table:
{
`{0}`,
@expand(CTRL_EntityKindTable a) `str8_lit_comp("$(a.code_name)")`
}
@data(String8) ctrl_entity_kind_display_string_table:
{
`{0}`,
+15
View File
@@ -91,6 +91,21 @@ ctrl_string_from_msg_kind(CTRL_MsgKind kind)
return result;
}
internal CTRL_EntityKind
ctrl_entity_kind_from_string(String8 string)
{
CTRL_EntityKind result = CTRL_EntityKind_Null;
for EachNonZeroEnumVal(CTRL_EntityKind, k)
{
if(str8_match(ctrl_entity_kind_code_name_table[k], string, 0))
{
result = k;
break;
}
}
return result;
}
////////////////////////////////
//~ rjf: Machine/Handle Pair Type Functions
+1
View File
@@ -951,6 +951,7 @@ internal U64 ctrl_hash_from_handle(CTRL_Handle handle);
internal CTRL_EventCause ctrl_event_cause_from_dmn_event_kind(DMN_EventKind event_kind);
internal String8 ctrl_string_from_event_kind(CTRL_EventKind kind);
internal String8 ctrl_string_from_msg_kind(CTRL_MsgKind kind);
internal CTRL_EntityKind ctrl_entity_kind_from_string(String8 string);
////////////////////////////////
//~ rjf: Handle Type Functions
+13
View File
@@ -4,6 +4,19 @@
//- GENERATED CODE
C_LINKAGE_BEGIN
String8 ctrl_entity_kind_code_name_table[9] =
{
{0},
str8_lit_comp("root"),
str8_lit_comp("machine"),
str8_lit_comp("process"),
str8_lit_comp("thread"),
str8_lit_comp("module"),
str8_lit_comp("entry_point"),
str8_lit_comp("debug_info_path"),
str8_lit_comp("pending_thread_name"),
};
String8 ctrl_entity_kind_display_string_table[9] =
{
{0},
+1
View File
@@ -64,6 +64,7 @@ CTRL_ExceptionCodeKind_COUNT,
} CTRL_ExceptionCodeKind;
C_LINKAGE_BEGIN
extern String8 ctrl_entity_kind_code_name_table[9];
extern String8 ctrl_entity_kind_display_string_table[9];
extern U32 ctrl_exception_code_kind_code_table[38];
extern String8 ctrl_exception_code_kind_display_string_table[38];