diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-29 19:08:47 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-29 19:08:47 +0900 |
| commit | 0bdc87d2396a607d05bad06e4e6d2d0bc0bc8f76 (patch) | |
| tree | c3a77f03cb550e18af5cec15c3c54fe81f905faf | |
| parent | 70a4cc6b085e7d1c06871c5f064adfb752a0db63 (diff) | |
| download | mruby-0bdc87d2396a607d05bad06e4e6d2d0bc0bc8f76.tar.gz mruby-0bdc87d2396a607d05bad06e4e6d2d0bc0bc8f76.zip | |
indent codedump when file/line info is not available; ref #2147
| -rw-r--r-- | src/codegen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c index f9ccf2d48..0347f8e7a 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -2694,7 +2694,6 @@ codedump(mrb_state *mrb, mrb_irep *irep) printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", irep, irep->nregs, irep->nlocals, (int)irep->plen, (int)irep->slen, (int)irep->rlen); - for (i = 0; i < (int)irep->ilen; i++) { ai = mrb_gc_arena_save(mrb); @@ -2704,7 +2703,10 @@ codedump(mrb_state *mrb, mrb_irep *irep) file = next_file; } line = mrb_debug_get_line(irep, i); - if (line != -1) { + if (line < 0) { + printf(" "); + } + else { printf("%5d ", line); } |
