From 76745161c536c6c72ec5d817d2640e0ec9f41638 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 24 Sep 2025 14:20:06 +0900 Subject: [PATCH] mruby-compiler: remove var_nodes_enabled and use_variable_nodes flags Eliminates gradual rollout feature flags that controlled variable-sized AST nodes. Variable-sized nodes are now the default and only behavior, completing the AST unification and simplification process. Co-authored-by: Claude --- include/mruby/compile.h | 2 -- mrbgems/mruby-compiler/core/parse.y | 4 ---- mrbgems/mruby-compiler/core/y.tab.c | 4 ---- 3 files changed, 10 deletions(-) diff --git a/include/mruby/compile.h b/include/mruby/compile.h index d447d50cd..538a96e06 100644 --- a/include/mruby/compile.h +++ b/include/mruby/compile.h @@ -33,7 +33,6 @@ typedef struct mrb_ccontext { mrb_bool keep_lv:1; mrb_bool no_optimize:1; mrb_bool no_ext_ops:1; - mrb_bool use_variable_nodes:1; /* Enable variable-sized AST nodes */ const struct RProc *upper; size_t parser_nerr; @@ -135,7 +134,6 @@ struct mrb_parser_state { uint16_t current_filename_index; /* Variable-sized node management */ - mrb_bool var_nodes_enabled:1; /* Feature flag for gradual rollout */ mrb_ast_node *nvars; }; diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index a50570b84..b8ba4fa4c 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -7071,7 +7071,6 @@ parser_init_cxt(parser_state *p, mrb_ccontext *cxt) p->no_optimize = cxt->no_optimize; p->no_ext_ops = cxt->no_ext_ops; p->upper = cxt->upper; - p->var_nodes_enabled = cxt->use_variable_nodes; if (cxt->partial_hook) { p->cxt = cxt; } @@ -7181,9 +7180,6 @@ mrb_parser_new(mrb_state *mrb) p->filename_table = NULL; p->filename_table_length = 0; - /* Initialize variable-sized node infrastructure */ - p->var_nodes_enabled = FALSE; - return p; } diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index bbfac0ecc..584db33af 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -13900,7 +13900,6 @@ parser_init_cxt(parser_state *p, mrb_ccontext *cxt) p->no_optimize = cxt->no_optimize; p->no_ext_ops = cxt->no_ext_ops; p->upper = cxt->upper; - p->var_nodes_enabled = cxt->use_variable_nodes; if (cxt->partial_hook) { p->cxt = cxt; } @@ -14010,9 +14009,6 @@ mrb_parser_new(mrb_state *mrb) p->filename_table = NULL; p->filename_table_length = 0; - /* Initialize variable-sized node infrastructure */ - p->var_nodes_enabled = FALSE; - return p; }