mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-16 17:12:23 -07:00
eliminate view rule column; eliminate 'parent irtree' experiment, need to do something else
This commit is contained in:
+2
-28
@@ -90,8 +90,6 @@ e_select_ir_ctx(E_IRCtx *ctx)
|
||||
e_ir_state->string_id_map->id_slots = push_array(e_ir_state->arena, E_StringIDSlot, e_ir_state->string_id_map->id_slots_count);
|
||||
e_ir_state->string_id_map->hash_slots_count = 1024;
|
||||
e_ir_state->string_id_map->hash_slots = push_array(e_ir_state->arena, E_StringIDSlot, e_ir_state->string_id_map->hash_slots_count);
|
||||
e_ir_state->top_parent = 0;
|
||||
e_ir_state->free_parent = 0;
|
||||
String8 builtin_view_rule_names[] =
|
||||
{
|
||||
str8_lit_comp("bswap"),
|
||||
@@ -819,32 +817,6 @@ e_expr_unpoison(E_Expr *expr)
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: irtree parent selection
|
||||
|
||||
internal void
|
||||
e_push_irtree_parent(E_IRTreeAndType parent)
|
||||
{
|
||||
E_IRParentNode *parent_n = e_ir_state->free_parent;
|
||||
if(parent_n != 0)
|
||||
{
|
||||
SLLStackPop(e_ir_state->free_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
parent_n = push_array(e_ir_state->arena, E_IRParentNode, 1);
|
||||
}
|
||||
parent_n->v = parent;
|
||||
SLLStackPush(e_ir_state->top_parent, parent_n);
|
||||
}
|
||||
|
||||
internal void
|
||||
e_pop_irtree_parent(void)
|
||||
{
|
||||
E_IRParentNode *popped = e_ir_state->top_parent;
|
||||
SLLStackPop(e_ir_state->top_parent);
|
||||
SLLStackPush(e_ir_state->free_parent, popped);
|
||||
}
|
||||
|
||||
//- rjf: default type access hook
|
||||
|
||||
E_TYPE_ACCESS_FUNCTION_DEF(default)
|
||||
@@ -2067,6 +2039,7 @@ e_irtree_and_type_from_expr(Arena *arena, E_Expr *root_expr)
|
||||
}
|
||||
|
||||
//- rjf: try to map name as parent expression signifier ('$')
|
||||
#if 0
|
||||
if(!string_mapped && str8_match(string, str8_lit("$"), 0) && e_ir_state->top_parent != 0)
|
||||
{
|
||||
E_OpList oplist = e_oplist_from_irtree(arena, e_ir_state->top_parent->v.root);
|
||||
@@ -2075,6 +2048,7 @@ e_irtree_and_type_from_expr(Arena *arena, E_Expr *root_expr)
|
||||
mapped_bytecode_mode = e_ir_state->top_parent->v.mode;
|
||||
mapped_type_key = e_ir_state->top_parent->v.type_key;
|
||||
}
|
||||
#endif
|
||||
|
||||
//- rjf: try globals
|
||||
if(!string_mapped && (qualifier.size == 0 || str8_match(qualifier, str8_lit("global"), 0)))
|
||||
|
||||
@@ -140,13 +140,6 @@ struct E_IRCtx
|
||||
////////////////////////////////
|
||||
//~ rjf: IR State
|
||||
|
||||
typedef struct E_IRParentNode E_IRParentNode;
|
||||
struct E_IRParentNode
|
||||
{
|
||||
E_IRParentNode *next;
|
||||
E_IRTreeAndType v;
|
||||
};
|
||||
|
||||
typedef struct E_IRState E_IRState;
|
||||
struct E_IRState
|
||||
{
|
||||
@@ -159,10 +152,6 @@ struct E_IRState
|
||||
// rjf: unpacked ctx
|
||||
RDI_Procedure *thread_ip_procedure;
|
||||
|
||||
// rjf: parent stack
|
||||
E_IRParentNode *top_parent;
|
||||
E_IRParentNode *free_parent;
|
||||
|
||||
// rjf: caches
|
||||
E_UsedExprMap *used_expr_map;
|
||||
E_TypeAutoHookCacheMap *type_auto_hook_cache_map;
|
||||
@@ -239,11 +228,6 @@ internal B32 e_expr_is_poisoned(E_Expr *expr);
|
||||
internal void e_expr_poison(E_Expr *expr);
|
||||
internal void e_expr_unpoison(E_Expr *expr);
|
||||
|
||||
//- rjf: irtree parent selection
|
||||
internal void e_push_irtree_parent(E_IRTreeAndType parent);
|
||||
internal void e_pop_irtree_parent(void);
|
||||
#define E_IRTreeParentScope(p) DeferLoop(e_push_irtree_parent(p), e_pop_irtree_parent())
|
||||
|
||||
//- rjf: top-level irtree/type extraction
|
||||
E_TYPE_ACCESS_FUNCTION_DEF(default);
|
||||
internal E_IRTreeAndType e_irtree_and_type_from_expr(Arena *arena, E_Expr *expr);
|
||||
|
||||
@@ -4056,10 +4056,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
}
|
||||
|
||||
// rjf: view ui contents
|
||||
E_IRTreeParentScope(cell_info.eval.irtree)
|
||||
{
|
||||
cell_info.view_ui_rule->ui(cell_info.eval, cell_rect);
|
||||
}
|
||||
cell_info.view_ui_rule->ui(cell_info.eval, cell_rect);
|
||||
|
||||
// rjf: loading fill
|
||||
UI_Parent(loading_overlay_container)
|
||||
@@ -4478,10 +4475,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
RD_ViewUIRule *view_ui_rule = rd_view_ui_rule_from_string(view_name);
|
||||
E_Eval expr_eval = e_eval_from_string(scratch.arena, expr_string);
|
||||
E_IRTreeParentScope(expr_eval.irtree)
|
||||
{
|
||||
view_ui_rule->ui(expr_eval, rect);
|
||||
}
|
||||
view_ui_rule->ui(expr_eval, rect);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1281,9 +1281,8 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
RD_Cfg *w_cfg = style->first;
|
||||
F32 next_pct = 0;
|
||||
#define take_pct() (next_pct = (F32)f64_from_str8(w_cfg->string), w_cfg = w_cfg->next, next_pct)
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, .default_pct = 0.65f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .string = str8_lit("lens:hex((U64)($expr))"), .default_pct = 0.20f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Tag, .default_pct = 0.15f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, .default_pct = 0.75f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .string = str8_lit("lens:hex((U64)($expr))"), .default_pct = 0.25f, .pct = take_pct());
|
||||
#undef take_pct
|
||||
}
|
||||
|
||||
@@ -1323,10 +1322,9 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
RD_Cfg *w_cfg = style->first;
|
||||
F32 next_pct = 0;
|
||||
#define take_pct() (next_pct = (F32)f64_from_str8(w_cfg->string), w_cfg = w_cfg->next, next_pct)
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, .default_pct = 0.25f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .default_pct = 0.35f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .string = str8_lit("typeof($expr)"), .default_pct = 0.15f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Tag, .default_pct = 0.25f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, .default_pct = 0.35f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .default_pct = 0.40f, .pct = take_pct());
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, .string = str8_lit("typeof($expr)"), .default_pct = 0.25f, .pct = take_pct());
|
||||
#undef take_pct
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user