Remove needless ruby2_keywords field from struct rb_args_info

`ruby2_keywords` is set only to be `0` in parse.y.
However `args->ruby2_keywords` is initialized with `0` by `MEMZERO`
in `rb_node_args_new` function and `body->param.flags.ruby2_keywords`
is initialized with `0` by `ZALLOC` in `rb_iseq_constant_body_alloc` function,
so `args->ruby2_keywords` does nothing for `body->param.flags.ruby2_keywords`.
This commit is contained in:
yui-knk 2025-12-09 09:05:45 +09:00 committed by Yuichiro Kaneko
parent 576acb9502
commit 056997cbcd
Notes: git 2025-12-09 01:09:30 +00:00
3 changed files with 0 additions and 4 deletions

View File

@ -2106,7 +2106,6 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons
EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS, COMPILE_NG); EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS, COMPILE_NG);
body->param.flags.ruby2_keywords = args->ruby2_keywords;
body->param.lead_num = arg_size = (int)args->pre_args_num; body->param.lead_num = arg_size = (int)args->pre_args_num;
if (body->param.lead_num > 0) body->param.flags.has_lead = TRUE; if (body->param.lead_num > 0) body->param.flags.has_lead = TRUE;
debugs(" - argc: %d\n", body->param.lead_num); debugs(" - argc: %d\n", body->param.lead_num);

View File

@ -14430,8 +14430,6 @@ new_args(struct parser_params *p, rb_node_args_aux_t *pre_args, rb_node_opt_arg_
args->opt_args = opt_args; args->opt_args = opt_args;
args->ruby2_keywords = 0;
nd_set_loc(RNODE(tail), loc); nd_set_loc(RNODE(tail), loc);
return tail; return tail;

View File

@ -782,7 +782,6 @@ struct rb_args_info {
struct RNode_OPT_ARG *opt_args; struct RNode_OPT_ARG *opt_args;
unsigned int no_kwarg: 1; unsigned int no_kwarg: 1;
unsigned int ruby2_keywords: 1;
unsigned int forwarding: 1; unsigned int forwarding: 1;
}; };