mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-23 20:24:59 -07:00
only -> rows; table -> columns
This commit is contained in:
@@ -2407,16 +2407,16 @@ E_TYPE_EXPAND_NUM_FROM_ID_FUNCTION_DEF(identity)
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `only` lens
|
||||
//~ rjf: (Built-In Type Hooks) `rows` lens
|
||||
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(only)
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(rows)
|
||||
{
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
E_TypeExpandInfo info = {0, type->count};
|
||||
return info;
|
||||
}
|
||||
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(only)
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(rows)
|
||||
{
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
U64 out_idx = 0;
|
||||
|
||||
@@ -142,10 +142,10 @@ E_TYPE_EXPAND_ID_FROM_NUM_FUNCTION_DEF(identity);
|
||||
E_TYPE_EXPAND_NUM_FROM_ID_FUNCTION_DEF(identity);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `only` lens
|
||||
//~ rjf: (Built-In Type Hooks) `rows` lens
|
||||
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(only);
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(only);
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(rows);
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(rows);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `sequence` lens
|
||||
|
||||
@@ -190,7 +190,7 @@ union Vector_R2
|
||||
};
|
||||
float v[2];
|
||||
};
|
||||
raddbg_type_view(Vector_R2, only($, x, y));
|
||||
raddbg_type_view(Vector_R2, rows($, x, y));
|
||||
|
||||
typedef union Matrix4x4F32 Matrix4x4F32;
|
||||
union Matrix4x4F32
|
||||
@@ -310,9 +310,9 @@ struct Crazy_Union
|
||||
};
|
||||
};
|
||||
raddbg_type_view(Crazy_Union,
|
||||
kind == Kind.First ? only($, first_and_third, first) :
|
||||
kind == Kind.Second ? only($, second) :
|
||||
kind == Kind.Third ? only($, first_and_third, third) :
|
||||
kind == Kind.First ? rows($, first_and_third, first) :
|
||||
kind == Kind.Second ? rows($, second) :
|
||||
kind == Kind.Third ? rows($, first_and_third, third) :
|
||||
kind == Kind.Fourth ? kind :
|
||||
$);
|
||||
|
||||
|
||||
@@ -2363,7 +2363,7 @@ raddbg_readme:
|
||||
@p "`pointer, 64`: Visualizes `pointer` as pointing to a 256-element array.";
|
||||
@p "`pointer, count`: Visualizes `pointer` as pointing to a `count`-element array.";
|
||||
@p "`slice(some_slice_struct)`: Interprets a structure type as containing a base pointer and a count (either through an integer, or an 'end pointer'), and visualizes the base pointer, pointing to that many elements.";
|
||||
@p "`only(some_struct, a, b, c)`: Displays the value of `some_struct`, but only showing members `a`, `b`, and `c`.";
|
||||
@p "`rows(some_struct, a, b, c)`: Displays the value of `some_struct`, but only showing members `a`, `b`, and `c`.";
|
||||
@p "`omit(some_struct, a, b, c)`: Displays the value of `some_struct`, but only showing members other than `a`, `b`, and `c`.";
|
||||
@p "`hex(my_int)`: Visualizes the value of `my_int` in base-16 (hexadecimal) form.";
|
||||
@p "`dec(my_int)`: Visualizes the value of `my_int` in base-10 (decimal) form.";
|
||||
@@ -2446,7 +2446,7 @@ raddbg_readme:
|
||||
@p "`no_char(expr)`: Disables character visualization with character or integer evaluations in `expr`.";
|
||||
@p "`no_addr(expr)`: Disables explicit address visualization with pointer evaluations in `expr`.";
|
||||
@p "`sequence(expr)`: Interprets `expr` as an integer, encoding how many sub-expressions `expr` should expand to produce. This can be used in combination with the `table` view to easily generate tables, indexing amongst many arrays.";
|
||||
@p "`only(expr, ...)`: Interpreting all post-`expr` arguments as member names, only expands to show those members of `expr`.";
|
||||
@p "`rows(expr, ...)`: Interpreting all post-`expr` arguments as member names, only expands to show those members of `expr`.";
|
||||
@p "`omit(expr, ...)`: Interpreting all post-`expr` arguments as member names, expands to show all members of `expr`, except those with matching names.";
|
||||
@p "`range1(expr, min, max)`: Expresses that `expr` is a bounded numeric value between `min` and `max`. Interpreted by the debugger to build slider UI for an evaluation.";
|
||||
@p "`array(expr, count)`: Expresses that `expr` points to `count` values, rather than 1, or the fixed size implied by a static array. When expanded, displays only that many values.";
|
||||
|
||||
@@ -12257,12 +12257,12 @@ rd_frame(void)
|
||||
{str8_lit("no_char"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("no_addr"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("sequence"), 0, 0, 1, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(sequence), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(sequence)}},
|
||||
{str8_lit("only"), 0, 0, 0, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(only), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(only)}},
|
||||
{str8_lit("rows"), 0, 0, 0, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(rows), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(rows)}},
|
||||
{str8_lit("columns"), 0, 0, 0, 0, 0, {0}},
|
||||
{str8_lit("omit"), 0, 0, 0, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(omit), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(omit)}},
|
||||
{str8_lit("range1"), 0, 0, 0, 0, 0, {0}},
|
||||
{str8_lit("array"), 0, 0, 1, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(array), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(array)}},
|
||||
{str8_lit("slice"), 0, 0, 1, E_TYPE_IREXT_FUNCTION_NAME(slice), E_TYPE_ACCESS_FUNCTION_NAME(slice), {E_TYPE_EXPAND_INFO_FUNCTION_NAME(slice), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(slice)}},
|
||||
{str8_lit("table"), 0, 0, 0, 0, 0, {0}},
|
||||
{str8_lit("text"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(text), EV_EXPAND_RULE_INFO_FUNCTION_NAME(text)},
|
||||
{str8_lit("disasm"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(disasm), EV_EXPAND_RULE_INFO_FUNCTION_NAME(disasm)},
|
||||
{str8_lit("memory"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(memory), EV_EXPAND_RULE_INFO_FUNCTION_NAME(memory)},
|
||||
|
||||
@@ -1075,13 +1075,13 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
info.view_ui_rule = rd_view_ui_rule_from_string(row->block->viz_expand_rule->string);
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: find possible table type
|
||||
//- rjf: find possible "columns" type
|
||||
//
|
||||
E_Type *maybe_table_type = block_type;
|
||||
for(;;)
|
||||
{
|
||||
if(maybe_table_type->kind == E_TypeKind_Lens &&
|
||||
str8_match(maybe_table_type->name, str8_lit("table"), 0))
|
||||
str8_match(maybe_table_type->name, str8_lit("columns"), 0))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
//- rjf: @watch_row_build_cells table rows
|
||||
//
|
||||
if(0){}
|
||||
else if(block->parent != &ev_nil_block && maybe_table_type->kind == E_TypeKind_Lens && str8_match(maybe_table_type->name, str8_lit("table"), 0) && maybe_table_type->count >= 1)
|
||||
else if(block->parent != &ev_nil_block && maybe_table_type->kind == E_TypeKind_Lens && str8_match(maybe_table_type->name, str8_lit("columns"), 0) && maybe_table_type->count >= 1)
|
||||
{
|
||||
U64 column_count = maybe_table_type->count;
|
||||
info.cell_style_key = push_str8f(arena, "table_%I64u_cols", column_count);
|
||||
|
||||
Reference in New Issue
Block a user