diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-18 12:40:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-18 12:40:36 +0900 |
| commit | a0143e148d4fdd3f7049e6fac57a9e5b41de8b0c (patch) | |
| tree | 46914424dd651a5c0289fe1c0359c43d0e2a80fd /src/codedump.c | |
| parent | f4119f518f92ee194a13c034ee9fd57e39bb4221 (diff) | |
| download | mruby-a0143e148d4fdd3f7049e6fac57a9e5b41de8b0c.tar.gz mruby-a0143e148d4fdd3f7049e6fac57a9e5b41de8b0c.zip | |
Make `mrb_codedump_all()` to print type of Proc.
Diffstat (limited to 'src/codedump.c')
| -rw-r--r-- | src/codedump.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/codedump.c b/src/codedump.c index c20afdd00..c4cb06f46 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -258,7 +258,15 @@ codedump(mrb_state *mrb, mrb_irep *irep) break; case OP_LAMBDA: - printf("OP_LAMBDA\tR%d\tI(%+d)\t%d", GETARG_A(c), GETARG_b(c)+1, GETARG_c(c)); + printf("OP_LAMBDA\tR%d\tI(%+d)\t", GETARG_A(c), GETARG_b(c)+1); + switch (GETARG_c(c)) { + case OP_L_METHOD: + printf("method"); break; + case OP_L_BLOCK: + printf("block"); break; + case OP_L_LAMBDA: + printf("lambda"); break; + } print_lv(mrb, irep, c, RA); break; case OP_RANGE: |
