mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
parse cache, ir-tree cache
This commit is contained in:
@@ -144,7 +144,7 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(watches)
|
||||
if(cfg_idx < cfgs->count)
|
||||
{
|
||||
String8 expr_string = rd_cfg_child_from_string(cfgs->v[cfg_idx], str8_lit("expression"))->first->string;
|
||||
exprs_out[idx] = e_parse_expr_from_text(arena, expr_string).expr;
|
||||
exprs_out[idx] = e_parse_from_string(expr_string).expr;
|
||||
exprs_strings_out[idx] = push_str8_copy(arena, expr_string);
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(locals)
|
||||
for(U64 idx = 0; idx < read_range_count; idx += 1)
|
||||
{
|
||||
String8 expr_string = accel->v[read_range.min + idx];
|
||||
exprs_out[idx] = e_parse_expr_from_text(arena, expr_string).expr;
|
||||
exprs_out[idx] = e_parse_from_string(expr_string).expr;
|
||||
exprs_strings_out[idx] = push_str8_copy(arena, expr_string);
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(registers)
|
||||
String8 register_name = accel->v[read_range.min + idx];
|
||||
String8 register_expr = push_str8f(arena, "reg:%S", register_name);
|
||||
exprs_strings_out[idx] = register_name;
|
||||
exprs_out[idx] = e_parse_expr_from_text(arena, register_expr).expr;
|
||||
exprs_out[idx] = e_parse_from_string(register_expr).expr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ E_TYPE_ACCESS_FUNCTION_DEF(schema)
|
||||
if(wrap_child_w_meta_expr)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_Expr *expr = e_parse_expr_from_text(scratch.arena, child->first->string).expr;
|
||||
E_Expr *expr = e_parse_from_string(child->first->string).expr;
|
||||
B32 expr_is_simple = 0;
|
||||
if(expr->kind == E_ExprKind_LeafU64 ||
|
||||
expr->kind == E_ExprKind_LeafF64 ||
|
||||
@@ -458,9 +458,8 @@ E_TYPE_ACCESS_FUNCTION_DEF(schema)
|
||||
MD_Node *range = md_tag_from_string(child_schema->first, str8_lit("range"), 0);
|
||||
if(!md_node_is_nil(range))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_Expr *min_bound = e_parse_expr_from_text(scratch.arena, range->first->string).expr;
|
||||
E_Expr *max_bound = e_parse_expr_from_text(scratch.arena, range->first->next->string).expr;
|
||||
E_Expr *min_bound = e_parse_from_string(range->first->string).expr;
|
||||
E_Expr *max_bound = e_parse_from_string(range->first->next->string).expr;
|
||||
E_Expr *args[] =
|
||||
{
|
||||
min_bound,
|
||||
@@ -471,7 +470,6 @@ E_TYPE_ACCESS_FUNCTION_DEF(schema)
|
||||
.direct_key = child_type_key,
|
||||
.count = 2,
|
||||
.args = args);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,8 +768,8 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(cfgs)
|
||||
{
|
||||
Rng1U64 read_range = intersect_1u64(cmds_idx_range, idx_range);
|
||||
U64 read_count = dim_1u64(read_range);
|
||||
E_Expr *commands = e_parse_expr_from_text(arena, str8_lit("query:commands")).expr;
|
||||
E_IRTreeAndType commands_irtree = e_irtree_and_type_from_expr(arena, commands);
|
||||
E_Expr *commands = e_parse_from_string(str8_lit("query:commands")).expr;
|
||||
E_IRTreeAndType commands_irtree = e_irtree_and_type_from_expr(commands);
|
||||
for(U64 idx = 0; idx < read_count; idx += 1, dst_idx += 1)
|
||||
{
|
||||
String8 cmd_name = accel->cmds.v[idx + read_range.min - cmds_idx_range.min];
|
||||
|
||||
Reference in New Issue
Block a user