mruby/mruby — pull request #1559 by Fleurer (2013-11-02 14:22:53+00:00)
Title: Add codedump to mirb

currently mirb --verbose will print the AST infomation in each expression, but have not the IREP yet.

this pr prints IREP togeter with AST by introducing a `codedump()`, to debug mirb issues easier.

```
$ bin/mirb --verbose
mirb - Embeddable Interactive Ruby Shell

This is a very early version, please test and report errors.
Thanks :)

> a=2;b=1
NODE_SCOPE:
local variables:
a, b
NODE_BEGIN:
NODE_ASGN:
lhs:
NODE_LVAR a
rhs:
NODE_INT 2 base 10
NODE_ASGN:
lhs:
NODE_LVAR b
rhs:
NODE_INT 1 base 10
irep 240 nregs=4 nlocals=3 pools=0 syms=0
000 OP_LOADI R1 2
001 OP_LOADI R3 1
002 OP_MOVE R2 R3
003 OP_STOP
```