mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 20:18:12 +00:00
eliminate redundant recomputation of ir extensions
This commit is contained in:
+5
-2
@@ -1597,6 +1597,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
|||||||
E_Mode mapped_bytecode_mode = E_Mode_Offset;
|
E_Mode mapped_bytecode_mode = E_Mode_Offset;
|
||||||
E_Space mapped_bytecode_space = zero_struct;
|
E_Space mapped_bytecode_space = zero_struct;
|
||||||
String8 mapped_bytecode = {0};
|
String8 mapped_bytecode = {0};
|
||||||
|
void *mapped_user_data = 0;
|
||||||
B32 generated = 0;
|
B32 generated = 0;
|
||||||
|
|
||||||
//- rjf: iterate identifier resolution rule paths, try to resolve
|
//- rjf: iterate identifier resolution rule paths, try to resolve
|
||||||
@@ -1629,6 +1630,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
|||||||
mapped_bytecode = e_bytecode_from_oplist(arena, &oplist);
|
mapped_bytecode = e_bytecode_from_oplist(arena, &oplist);
|
||||||
mapped_bytecode_mode = parent_irtree->mode;
|
mapped_bytecode_mode = parent_irtree->mode;
|
||||||
mapped_type_key = parent_irtree->type_key;
|
mapped_type_key = parent_irtree->type_key;
|
||||||
|
mapped_user_data = parent_irtree->user_data;
|
||||||
is_auto_hook = parent_irtree->auto_hook;
|
is_auto_hook = parent_irtree->auto_hook;
|
||||||
disallow_autohooks = 1;
|
disallow_autohooks = 1;
|
||||||
E_MsgList msgs = e_msg_list_copy(arena, &parent_irtree->msgs);
|
E_MsgList msgs = e_msg_list_copy(arena, &parent_irtree->msgs);
|
||||||
@@ -2067,8 +2069,9 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
|||||||
result = e_push_irtree_and_type_from_expr(arena, parent, &e_default_identifier_resolution_rule, disallow_autohooks, 1, access);
|
result = e_push_irtree_and_type_from_expr(arena, parent, &e_default_identifier_resolution_rule, disallow_autohooks, 1, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- rjf: mark if auto hook
|
//- rjf: mark if auto hook, equip user data
|
||||||
result.auto_hook = is_auto_hook;
|
result.auto_hook = is_auto_hook;
|
||||||
|
result.user_data = mapped_user_data;
|
||||||
|
|
||||||
//- rjf: error on failure-to-generate
|
//- rjf: error on failure-to-generate
|
||||||
if(!generated && !str8_match(string, str8_lit("$"), 0))
|
if(!generated && !str8_match(string, str8_lit("$"), 0))
|
||||||
@@ -2269,7 +2272,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(irext != 0)
|
if(irext != 0 && result.user_data == 0)
|
||||||
{
|
{
|
||||||
E_IRTreeAndType irtree_stripped = result;
|
E_IRTreeAndType irtree_stripped = result;
|
||||||
if(type->kind == E_TypeKind_Lens)
|
if(type->kind == E_TypeKind_Lens)
|
||||||
|
|||||||
@@ -1430,9 +1430,9 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
|||||||
RD_Cfg *w_cfg = style->first;
|
RD_Cfg *w_cfg = style->first;
|
||||||
F32 next_pct = 0;
|
F32 next_pct = 0;
|
||||||
#define take_pct() (next_pct = (F32)f64_from_str8(w_cfg->string), w_cfg = w_cfg->next, next_pct)
|
#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_CallStackFrame, row->eval, .default_pct = 0.05f, .pct = take_pct());
|
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_CallStackFrame, row->eval, .default_pct = 0.05f, .pct = take_pct());
|
||||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, row->eval, .default_pct = 0.55f, .pct = take_pct());
|
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, row->eval, .default_pct = 0.55f, .pct = take_pct());
|
||||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, e_eval_wrapf(row->eval, "lens:hex((uint64)$)"), .default_pct = 0.20f, .pct = take_pct());
|
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, e_eval_wrapf(row->eval, "hex((uint64)$)"), .default_pct = 0.20f, .pct = take_pct());
|
||||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, (module == &ctrl_entity_nil ? (E_Eval)zero_struct : module_eval),
|
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, (module == &ctrl_entity_nil ? (E_Eval)zero_struct : module_eval),
|
||||||
.default_pct = 0.20f, .pct = take_pct());
|
.default_pct = 0.20f, .pct = take_pct());
|
||||||
#undef take_pct
|
#undef take_pct
|
||||||
|
|||||||
Reference in New Issue
Block a user