preparation for tail call optimization (still has bugs)

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-04-09 15:31:17 +09:00
parent 5306e4716e
commit 84acf4e3f3
2 changed files with 14 additions and 5 deletions
+8
View File
@@ -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;
}