mruby-compiler: remove unused NODE_CALLARGS node type

Remove NODE_CALLARGS enum value and parser dump case which are no longer
used in the codebase. The struct mrb_ast_callargs exists and is actively
used by new_callargs(), but it doesn't have a mrb_ast_var_header and is
never assigned the NODE_CALLARGS node type.

This cleanup removes dead code from the enum node_type and eliminates
an unreachable parser dump case, since no nodes are ever created with
NODE_CALLARGS type.

The callargs functionality remains fully intact - only the unused enum
value and unreachable dump case are removed.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-09-25 21:04:35 +09:00
parent 0c25c0d95f
commit b3d501e98c
3 changed files with 0 additions and 39 deletions
-1
View File
@@ -59,7 +59,6 @@ enum node_type {
NODE_XSTR,
NODE_REGX,
NODE_DREGX,
NODE_CALLARGS,
NODE_SPLAT,
NODE_TO_ARY,
NODE_SVALUE,
-19
View File
@@ -7807,25 +7807,6 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
}
break;
case NODE_CALLARGS:
printf("NODE_CALLARGS:\n");
if (CALLARGS_NODE_REGULAR(tree)) {
dump_prefix(tree, offset+1);
printf("regular_args:\n");
dump_recur(mrb, CALLARGS_NODE_REGULAR(tree), offset+2);
}
if (CALLARGS_NODE_KEYWORDS(tree)) {
dump_prefix(tree, offset+1);
printf("keyword_args:\n");
mrb_parser_dump(mrb, CALLARGS_NODE_KEYWORDS(tree), offset+2);
}
if (CALLARGS_NODE_BLOCK(tree)) {
dump_prefix(tree, offset+1);
printf("block_arg:\n");
mrb_parser_dump(mrb, CALLARGS_NODE_BLOCK(tree), offset+2);
}
break;
case NODE_TRUE:
printf("NODE_TRUE\n");
break;
-19
View File
@@ -14636,25 +14636,6 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
}
break;
case NODE_CALLARGS:
printf("NODE_CALLARGS:\n");
if (CALLARGS_NODE_REGULAR(tree)) {
dump_prefix(tree, offset+1);
printf("regular_args:\n");
dump_recur(mrb, CALLARGS_NODE_REGULAR(tree), offset+2);
}
if (CALLARGS_NODE_KEYWORDS(tree)) {
dump_prefix(tree, offset+1);
printf("keyword_args:\n");
mrb_parser_dump(mrb, CALLARGS_NODE_KEYWORDS(tree), offset+2);
}
if (CALLARGS_NODE_BLOCK(tree)) {
dump_prefix(tree, offset+1);
printf("block_arg:\n");
mrb_parser_dump(mrb, CALLARGS_NODE_BLOCK(tree), offset+2);
}
break;
case NODE_TRUE:
printf("NODE_TRUE\n");
break;