mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
codedump.c: update OP_DEF output
OP_DEF takes R(a) as a class to define a method, sym(b) as a method name, and R(a+1) as a method body. So we added `(R(a+1))` in the output.
This commit is contained in:
+1
-1
@@ -413,7 +413,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep, FILE *out)
|
||||
fprintf(out, "RANGE_EXC\tR%d\n", a);
|
||||
break;
|
||||
CASE(OP_DEF, BB):
|
||||
fprintf(out, "DEF\t\tR%d\t:%s\n", a, mrb_sym_dump(mrb, irep->syms[b]));
|
||||
fprintf(out, "DEF\t\tR%d\t:%s\t(R%d)\n", a, mrb_sym_dump(mrb, irep->syms[b]),a+1);
|
||||
break;
|
||||
CASE(OP_UNDEF, B):
|
||||
fprintf(out, "UNDEF\t\t:%s\n", mrb_sym_dump(mrb, irep->syms[a]));
|
||||
|
||||
Reference in New Issue
Block a user