partial transition to new flexible watch table structure; more work on 'set' types; checkpoint before replacement of old view-rule-hacks with proper-eval-system support for sets/collections/etc.

This commit is contained in:
Ryan Fleury
2025-01-30 14:11:01 -08:00
parent 92e68701d0
commit 12784d9ae9
10 changed files with 290 additions and 471 deletions
+9 -15
View File
@@ -73,7 +73,7 @@ RD_VocabularyInfo rd_vocabulary_info_table[41] =
{str8_lit_comp("label"), str8_lit_comp("labels"), str8_lit_comp("Label"), str8_lit_comp("Labels"), RD_IconKind_Null},
};
RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[6] =
RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[7] =
{
{str8_lit_comp("settings"), str8_lit_comp("x:\n{\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n @default(1) 'background_blur': bool,\n @default(1) 'thread_lines': bool,\n @default(1) 'breakpoint_lines': bool,\n @default(1) 'thread_glow': bool,\n @default(1) 'breakpoint_glow': bool,\n @default(0) 'opaque_backgrounds': bool,\n @default(1) 'smooth_main_text': bool,\n @default(0) 'smooth_code_text': bool,\n @default(1) 'hint_main_text': bool,\n @default(1) 'hint_code_text': bool,\n @default(2) 'tab_width': @range[1, 32] u64,\n @can_be_per_window 'main_font_size': @range[6, 72] u64,\n @can_be_per_window 'code_font_size': @range[1, 32] u64,\n}\n"), str8_lit_comp("")},
{str8_lit_comp("target"), str8_lit_comp("x:\n{\n 'label': code_string,\n 'executable': path,\n 'arguments': string,\n 'working_directory': path,\n 'entry_point': code_string,\n 'stdout_path': path,\n 'stderr_path': path,\n 'stdin_path': path,\n 'debug_subprocesses': bool,\n}\n"), str8_lit_comp("launch_and_run,launch_and_init,select_cfg,remove_cfg")},
@@ -81,6 +81,7 @@ RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[6] =
{str8_lit_comp("watch_pin"), str8_lit_comp("x:\n{\n 'expression': code_string,\n 'view_rule': code_string,\n 'location': location,\n}\n"), str8_lit_comp("remove_cfg")},
{str8_lit_comp("file_path_map"), str8_lit_comp("x:{'source':path, 'dest':path}"), str8_lit_comp("remove_cfg")},
{str8_lit_comp("auto_view_rule"), str8_lit_comp("x:{'source':code_string, 'dest':code_string}"), str8_lit_comp("remove_cfg")},
{str8_lit_comp("watch"), str8_lit_comp("x:\n{\n 'expression': code_string,\n 'view_rule': code_string,\n}\n"), str8_lit_comp("remove_cfg")},
};
String8 d_entity_kind_display_string_table[27] =
@@ -710,9 +711,8 @@ str8_lit_comp("5"),
str8_lit_comp("c"),
};
String8 rd_collection_name_table[13] =
String8 rd_collection_name_table[12] =
{
str8_lit_comp("watches"),
str8_lit_comp("machines"),
str8_lit_comp("processes"),
str8_lit_comp("threads"),
@@ -727,9 +727,8 @@ str8_lit_comp("types"),
str8_lit_comp("procedures"),
};
RD_EntityKind rd_collection_entity_kind_table[13] =
RD_EntityKind rd_collection_entity_kind_table[12] =
{
RD_EntityKind_Watch,
RD_EntityKind_Nil,
RD_EntityKind_Nil,
RD_EntityKind_Nil,
@@ -744,9 +743,8 @@ RD_EntityKind_Nil,
RD_EntityKind_Nil,
};
CTRL_EntityKind rd_collection_ctrl_entity_kind_table[13] =
CTRL_EntityKind rd_collection_ctrl_entity_kind_table[12] =
{
CTRL_EntityKind_Null,
CTRL_EntityKind_Machine,
CTRL_EntityKind_Process,
CTRL_EntityKind_Thread,
@@ -761,9 +759,8 @@ CTRL_EntityKind_Null,
CTRL_EntityKind_Null,
};
EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[13] =
EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[12] =
{
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(watches),
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(machines),
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(processes),
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(threads),
@@ -778,9 +775,8 @@ EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(types),
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(procedures),
};
EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[13] =
EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[12] =
{
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(watches),
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(machines),
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(processes),
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(threads),
@@ -795,9 +791,8 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(types),
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(procedures),
};
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[13] =
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[12] =
{
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(watches),
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(machines),
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(processes),
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(threads),
@@ -812,9 +807,8 @@ EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(types),
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(procedures),
};
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[13] =
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[12] =
{
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(watches),
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(machines),
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(processes),
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(threads),
+8 -12
View File
@@ -651,7 +651,6 @@ RD_ViewRuleUIFunctionType *ui;
.params_tree = rd_regs()->params_tree,\
.os_event = rd_regs()->os_event,\
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watches);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(machines);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(processes);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(threads);
@@ -664,7 +663,6 @@ EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(globals);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(thread_locals);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(types);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(procedures);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watches);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(machines);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(processes);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(threads);
@@ -677,7 +675,6 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(globals);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(thread_locals);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(types);
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(procedures);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watches);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(machines);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(processes);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(threads);
@@ -688,7 +685,6 @@ EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(globals);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(thread_locals);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(types);
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(procedures);
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watches);
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(machines);
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(processes);
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(threads);
@@ -738,7 +734,7 @@ extern String8 rd_cfg_src_string_table[4];
extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4];
extern RD_CmdKind rd_cfg_src_write_cmd_kind_table[4];
extern RD_VocabularyInfo rd_vocabulary_info_table[41];
extern RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[6];
extern RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[7];
extern String8 d_entity_kind_display_string_table[27];
extern String8 d_entity_kind_name_lower_table[27];
extern String8 d_entity_kind_name_lower_plural_table[27];
@@ -749,13 +745,13 @@ extern RD_StringBindingPair rd_default_binding_table[110];
extern String8 rd_binding_version_remap_old_name_table[8];
extern String8 rd_binding_version_remap_new_name_table[8];
extern String8 rd_icon_kind_text_table[69];
extern String8 rd_collection_name_table[13];
extern RD_EntityKind rd_collection_entity_kind_table[13];
extern CTRL_EntityKind rd_collection_ctrl_entity_kind_table[13];
extern EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[13];
extern EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[13];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[13];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[13];
extern String8 rd_collection_name_table[12];
extern RD_EntityKind rd_collection_entity_kind_table[12];
extern CTRL_EntityKind rd_collection_ctrl_entity_kind_table[12];
extern EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[12];
extern EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[12];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[12];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[12];
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[28];
extern RD_IconKind rd_entity_kind_icon_kind_table[27];
extern String8 rd_theme_preset_display_string_table[9];