move mrb_irep_remove_lv to codegen.c in mruby-compiler
MODIFY
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
@@ -3092,3 +3092,18 @@ mrb_generate_code(mrb_state *mrb, parser_state *p)
{
return generate_code(mrb, p, VAL);
}
+
+void
+mrb_irep_remove_lv(mrb_state *mrb, mrb_irep *irep)
+{
+ int i;
+
+ if (irep->lv) {
+ mrb_free(mrb, irep->lv);
+ irep->lv = NULL;
+ }
+
+ for (i = 0; i < irep->rlen; ++i) {
+ mrb_irep_remove_lv(mrb, irep->reps[i]);
+ }
+}

MODIFY
src/dump.c
src/dump.c
@@ -1103,19 +1103,4 @@ mrb_dump_irep_cfunc(mrb_state *mrb, mrb_irep *irep, uint8_t flags, FILE *fp, con
return result;
}
-void
-mrb_irep_remove_lv(mrb_state *mrb, mrb_irep *irep)
-{
- int i;
-
- if (irep->lv) {
- mrb_free(mrb, irep->lv);
- irep->lv = NULL;
- }
-
- for (i = 0; i < irep->rlen; ++i) {
- mrb_irep_remove_lv(mrb, irep->reps[i]);
- }
-}
-
#endif /* MRB_DISABLE_STDIO */

move mrb_irep_remove_lv to codegen.c in mruby-compiler