mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
more aggressively gc hover eval view state; do not use hotkey intermediate if a command triggered by a watch window is already parameterized
This commit is contained in:
+25
-12
@@ -5581,7 +5581,17 @@ rd_view_ui(Rng2F32 rect)
|
|||||||
{
|
{
|
||||||
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(row_info->eval.space);
|
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(row_info->eval.space);
|
||||||
RD_Cfg *cfg = rd_cfg_from_eval_space(row_info->eval.space);
|
RD_Cfg *cfg = rd_cfg_from_eval_space(row_info->eval.space);
|
||||||
rd_cmd(RD_CmdKind_RunCommand, .cfg = cfg->id, .ctrl_entity = entity->handle, .cmd_name = cell_info.cmd_name);
|
RD_RegsScope(.cfg = cfg->id, .ctrl_entity = entity->handle)
|
||||||
|
{
|
||||||
|
if(cfg != &rd_nil_cfg || entity != &ctrl_entity_nil)
|
||||||
|
{
|
||||||
|
rd_push_cmd(cell_info.cmd_name, rd_regs());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rd_cmd(RD_CmdKind_RunCommand, .cmd_name = cell_info.cmd_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// rjf: row has callstack info? -> select unwind
|
// rjf: row has callstack info? -> select unwind
|
||||||
@@ -7487,6 +7497,18 @@ rd_window_frame(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rjf: request frames if we're waiting to open
|
||||||
|
if(ws->hover_eval_string.size != 0 &&
|
||||||
|
!hover_eval_is_open &&
|
||||||
|
ws->hover_eval_lastt_us < ws->hover_eval_firstt_us+hover_eval_open_delay_us &&
|
||||||
|
rd_state->time_in_us - ws->hover_eval_lastt_us < hover_eval_open_delay_us*2)
|
||||||
|
{
|
||||||
|
rd_request_frame();
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: build hover eval task
|
||||||
|
if(build_hover_eval)
|
||||||
|
{
|
||||||
// rjf: determine if we have a top-level visualizer
|
// rjf: determine if we have a top-level visualizer
|
||||||
EV_ExpandRuleTagPair expand_rule_tag = ev_expand_rule_tag_pair_from_expr_irtree(hover_eval.exprs.last, &hover_eval.irtree);
|
EV_ExpandRuleTagPair expand_rule_tag = ev_expand_rule_tag_pair_from_expr_irtree(hover_eval.exprs.last, &hover_eval.irtree);
|
||||||
RD_ViewUIRule *view_ui_rule = rd_view_ui_rule_from_string(expand_rule_tag.rule->string);
|
RD_ViewUIRule *view_ui_rule = rd_view_ui_rule_from_string(expand_rule_tag.rule->string);
|
||||||
@@ -7502,16 +7524,7 @@ rd_window_frame(void)
|
|||||||
RD_Cfg *root = rd_immediate_cfg_from_keyf("hover_eval_view");
|
RD_Cfg *root = rd_immediate_cfg_from_keyf("hover_eval_view");
|
||||||
RD_Cfg *view = rd_cfg_child_from_string_or_alloc(root, view_name);
|
RD_Cfg *view = rd_cfg_child_from_string_or_alloc(root, view_name);
|
||||||
RD_Cfg *explicit_root = rd_cfg_child_from_string_or_alloc(view, str8_lit("explicit_root"));
|
RD_Cfg *explicit_root = rd_cfg_child_from_string_or_alloc(view, str8_lit("explicit_root"));
|
||||||
rd_cfg_new(explicit_root, str8_lit("1"));
|
rd_cfg_new_replace(explicit_root, str8_lit("1"));
|
||||||
|
|
||||||
// rjf: request frames if we're waiting to open
|
|
||||||
if(ws->hover_eval_string.size != 0 &&
|
|
||||||
!hover_eval_is_open &&
|
|
||||||
ws->hover_eval_lastt_us < ws->hover_eval_firstt_us+hover_eval_open_delay_us &&
|
|
||||||
rd_state->time_in_us - ws->hover_eval_lastt_us < hover_eval_open_delay_us*2)
|
|
||||||
{
|
|
||||||
rd_request_frame();
|
|
||||||
}
|
|
||||||
|
|
||||||
// rjf: determine size of hover evaluation container
|
// rjf: determine size of hover evaluation container
|
||||||
EV_BlockTree predicted_block_tree = {0};
|
EV_BlockTree predicted_block_tree = {0};
|
||||||
@@ -7542,7 +7555,6 @@ rd_window_frame(void)
|
|||||||
ws->hover_eval_spawn_pos.y + height_px);
|
ws->hover_eval_spawn_pos.y + height_px);
|
||||||
|
|
||||||
// rjf: push hover eval task
|
// rjf: push hover eval task
|
||||||
if(build_hover_eval)
|
|
||||||
{
|
{
|
||||||
FloatingViewTask *t = push_array(scratch.arena, FloatingViewTask, 1);
|
FloatingViewTask *t = push_array(scratch.arena, FloatingViewTask, 1);
|
||||||
SLLQueuePush(first_floating_view_task, last_floating_view_task, t);
|
SLLQueuePush(first_floating_view_task, last_floating_view_task, t);
|
||||||
@@ -7555,6 +7567,7 @@ rd_window_frame(void)
|
|||||||
t->is_focused = ws->hover_eval_focused;
|
t->is_focused = ws->hover_eval_focused;
|
||||||
t->is_anchored = 1;
|
t->is_anchored = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// rjf: reset focus state if hover eval is not being built
|
// rjf: reset focus state if hover eval is not being built
|
||||||
if(!build_hover_eval || ws->hover_eval_string.size == 0 || !hover_eval_is_open)
|
if(!build_hover_eval || ws->hover_eval_string.size == 0 || !hover_eval_is_open)
|
||||||
|
|||||||
Reference in New Issue
Block a user