Avoid snapshots for returns to known callers.

This commit is contained in:
Mike Pall 2010-03-21 16:01:44 +01:00
parent 8e20b030ac
commit 51c14bf1c8

View File

@ -575,8 +575,8 @@ static void rec_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
ptrdiff_t nresults = bc_b(callins) ? (ptrdiff_t)bc_b(callins)-1 :gotresults; ptrdiff_t nresults = bc_b(callins) ? (ptrdiff_t)bc_b(callins)-1 :gotresults;
BCReg cbase = bc_a(callins); BCReg cbase = bc_a(callins);
GCproto *pt = funcproto(frame_func(frame - (cbase+1))); GCproto *pt = funcproto(frame_func(frame - (cbase+1)));
if (J->pt && frame == J->L->base - 1) { if (J->framedepth == 0 && J->pt && frame == J->L->base - 1) {
if (J->framedepth == 0 && check_downrec_unroll(J, pt)) { if (check_downrec_unroll(J, pt)) {
J->maxslot = (BCReg)(rbase + nresults); J->maxslot = (BCReg)(rbase + nresults);
rec_stop(J, J->curtrace); /* Down-recursion. */ rec_stop(J, J->curtrace); /* Down-recursion. */
return; return;