diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 15:31:17 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 15:31:17 +0900 |
| commit | 84acf4e3f38d01c72ae077db1234c880658c10aa (patch) | |
| tree | 729e3f6fee04f2cb716f2279ed7100a747cbdaa7 /src/codegen.c | |
| parent | 5306e4716e6774db4170052eac711680b7d51aa4 (diff) | |
| download | mruby-84acf4e3f38d01c72ae077db1234c880658c10aa.tar.gz mruby-84acf4e3f38d01c72ae077db1234c880658c10aa.zip | |
preparation for tail call optimization (still has bugs)
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/codegen.c b/src/codegen.c index 83d0136ef..d9fc10657 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -317,6 +317,14 @@ genop_peep(codegen_scope *s, mrb_code i, int val) s->iseq[s->pc-1] = MKOP_A(c0, 0); genop(s, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL)); return; +#if 0 + case OP_SEND: + if (GETARG_B(i) == OP_R_NORMAL && GETARG_A(i) == GETARG_A(i0)) { + s->iseq[s->pc-1] = MKOP_ABC(OP_TAILCALL, GETARG_A(i0), GETARG_B(i0), GETARG_C(i0)); + return; + } + break; +#endif default: break; } |
