]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Sat, 17 Jan 2015 13:57:24 +0000 (14:57 +0100)
committerMike Pall <mike>
Sat, 17 Jan 2015 13:57:24 +0000 (14:57 +0100)
1  2 
src/lj_record.c

diff --cc src/lj_record.c
index 04a4c73c8f66dafa5ec193529032de12548cacb0,843108c85a79bb9652f08385d2497cd7b7c31bf4..560381565ac3c5f092dfcc651e37777430241f1a
@@@ -811,10 -742,11 +811,12 @@@ void lj_record_ret(jit_State *J, BCReg 
        lua_assert(J->baseslot > cbase+1);
        J->baseslot -= cbase+1;
        J->base -= cbase+1;
 -    } else if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))) {
 +    } else if (J->parent == 0 && J->exitno == 0 &&
 +             !bc_isret(bc_op(J->cur.startins))) {
        /* Return to lower frame would leave the loop in a root trace. */
        lj_trace_err(J, LJ_TRERR_LLEAVE);
+     } else if (J->needsnap) {  /* Tailcalled to ff with side-effects. */
+       lj_trace_err(J, LJ_TRERR_NYIRETL);  /* No way to insert snapshot here. */
      } else {  /* Return to lower frame. Guard for the target we return to. */
        TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO);
        TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame));