]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Don't compile IR_RETF after CALLT to ff with-side effects.
authorMike Pall <mike>
Sat, 17 Jan 2015 13:50:41 +0000 (14:50 +0100)
committerMike Pall <mike>
Sat, 17 Jan 2015 13:50:41 +0000 (14:50 +0100)
src/lj_record.c

index 19f17639303aa95e0364b888ed8e25a22f6c8439..843108c85a79bb9652f08385d2497cd7b7c31bf4 100644 (file)
@@ -745,6 +745,8 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
     } else if (J->parent == 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));