summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-11-10 04:34:53 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-11-10 04:34:53 +0900
commita725bd7a237de6f7d03556c77ad1cf79d27bfcf4 (patch)
tree327e2710e3632157cedd3a8274ffd25597728b21
parent3bbf66f9f302e655d5d6a44029590df62dc5b4e6 (diff)
downloadmruby-a725bd7a237de6f7d03556c77ad1cf79d27bfcf4.tar.gz
mruby-a725bd7a237de6f7d03556c77ad1cf79d27bfcf4.zip
call codedump_all() from mirb if --verbose is set; close #1559
-rw-r--r--mrbgems/mruby-bin-mirb/tools/mirb/mirb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
index f5e5900f0..501f09e4c 100644
--- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
@@ -236,6 +236,8 @@ print_cmdline(int code_block_open)
}
}
+void codedump_all(mrb_state*, struct RProc*);
+
int
main(int argc, char **argv)
{
@@ -365,6 +367,9 @@ main(int argc, char **argv)
/* generate bytecode */
struct RProc *proc = mrb_generate_code(mrb, parser);
+ if (args.verbose) {
+ codedump_all(mrb, proc);
+ }
/* pass a proc for evaulation */
nregs = first_command ? 0: proc->body.irep->nregs;
/* evaluate the bytecode */