mruby-compiler: remove traditional node generation from new_back_ref

Remove if (!p->var_nodes_enabled) branch from new_back_ref function
to use variable-sized nodes exclusively for regex backreferences.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-08-30 14:09:54 +09:00
parent 90436a4078
commit 8335b7a0a2
2 changed files with 1072 additions and 1080 deletions
-4
View File
@@ -2462,10 +2462,6 @@ new_dregx(parser_state *p, node *a, node *b)
static node*
new_back_ref(parser_state *p, int n)
{
if (!p->var_nodes_enabled) {
return cons_head((node*)NODE_BACK_REF, int_to_node(n));
}
size_t total_size = sizeof(struct mrb_ast_back_ref_node);
enum mrb_ast_size_class class = size_to_class(total_size);
struct mrb_ast_back_ref_node *backref_node = (struct mrb_ast_back_ref_node*)
File diff suppressed because it is too large Load Diff