mruby-compiler: remove traditional node generation from new_nth_ref

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

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