From 84acf4e3f38d01c72ae077db1234c880658c10aa Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 9 Apr 2013 15:31:17 +0900 Subject: preparation for tail call optimization (still has bugs) --- src/codegen.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/codegen.c') 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; } -- cgit v1.2.3