diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-05 01:40:23 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-05 01:40:23 +0900 |
| commit | ca930538eaac4aa64ce65ef6dbf6c60fe3caccab (patch) | |
| tree | aab39a650d92ba9c3c77b97722f4b0bc0d211df7 /src | |
| parent | c4208a413d2706d2914c5ebe112fe14308090f92 (diff) | |
| download | mruby-ca930538eaac4aa64ce65ef6dbf6c60fe3caccab.tar.gz mruby-ca930538eaac4aa64ce65ef6dbf6c60fe3caccab.zip | |
prepare for OP_TAILCALL
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.c | 5 | ||||
| -rw-r--r-- | src/vm.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index 963e94b21..3236713e2 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -2149,6 +2149,11 @@ codedump(mrb_state *mrb, int n) mrb_sym2name(mrb, irep->syms[GETARG_B(c)]), GETARG_C(c)); break; + case OP_TAILCALL: + printf("OP_TAILCALL\tR%d\t:%s\t%d\n", GETARG_A(c), + mrb_sym2name(mrb, irep->syms[GETARG_B(c)]), + GETARG_C(c)); + break; case OP_SUPER: printf("OP_SUPER\tR%d\t%d\n", GETARG_A(c), GETARG_C(c)); @@ -1120,7 +1120,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) /* replace callinfo */ - mrb->ci = ci = &mrb->ci[-1]; + ci = mrb->ci; ci->mid = mid; ci->target_class = m->target_class; ci->argc = n; |
