From 28d2dfbb1147e7095ff905185ccf42bb390bb0b8 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 29 Nov 2024 16:45:26 +0900 Subject: [PATCH] mruby-bin-mrbc: use MRB_DUMP_NO_LVAR flag Instead of `mrb_irep_remove_lv()` function. --- mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c index 8856beab6..f4476ebc4 100644 --- a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +++ b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c @@ -24,7 +24,6 @@ struct mrbc_args { mrb_bool dump_struct : 1; mrb_bool check_syntax : 1; mrb_bool verbose : 1; - mrb_bool remove_lv : 1; mrb_bool no_ext_ops : 1; mrb_bool no_optimize : 1; uint8_t flags : 2; @@ -165,7 +164,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args) exit(EXIT_SUCCESS); } else if (strcmp(argv[i] + 2, "remove-lv") == 0) { - args->remove_lv = TRUE; + args->flags |= MRB_DUMP_NO_LVAR; break; } else if (strcmp(argv[i] + 2, "no-ext-ops") == 0) { @@ -264,9 +263,6 @@ dump_file(mrb_state *mrb, FILE *wfp, const char *outfile, struct RProc *proc, st int n = MRB_DUMP_OK; const mrb_irep *irep = proc->body.irep; - if (args->remove_lv) { - mrb_irep_remove_lv(mrb, (mrb_irep*)irep); - } if (args->initname) { if (args->dump_struct) { n = mrb_dump_irep_cstruct(mrb, irep, args->flags, wfp, args->initname);