Skip to content

Commit

Permalink
codedump.c: do not print nameless registers.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Feb 21, 2022
1 parent ce3b1c4 commit 349307b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/codedump.c
Expand Up @@ -101,7 +101,10 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
printf("local variable names:\n");
for (i = 1; i < irep->nlocals; ++i) {
char const *s = mrb_sym_dump(mrb, irep->lv[i - 1]);
printf(" R%d:%s\n", i, s ? s : "");
if (s) {
printf(" R%d:%s", i, s);
}
putchar('\n');
}
}

Expand Down

0 comments on commit 349307b

Please sign in to comment.