summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_record.c2
-rw-r--r--src/lj_traceerr.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 7336e0ac..30b9efc1 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -722,6 +722,8 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
ptrdiff_t nresults = bc_b(callins) ? (ptrdiff_t)bc_b(callins)-1 :gotresults;
BCReg cbase = bc_a(callins);
GCproto *pt = funcproto(frame_func(frame - (cbase+1)));
+ if ((pt->flags & PROTO_NOJIT))
+ lj_trace_err(J, LJ_TRERR_CJITOFF);
if (J->framedepth == 0 && J->pt && frame == J->L->base - 1) {
if (check_downrec_unroll(J, pt)) {
J->maxslot = (BCReg)(rbase + gotresults);
diff --git a/src/lj_traceerr.h b/src/lj_traceerr.h
index 2ef4ad63..8f463ca6 100644
--- a/src/lj_traceerr.h
+++ b/src/lj_traceerr.h
@@ -20,7 +20,7 @@ TREDEF(LUNROLL, "loop unroll limit reached")
/* Recording calls/returns. */
TREDEF(BADTYPE, "bad argument type")
-TREDEF(CJITOFF, "call to JIT-disabled function")
+TREDEF(CJITOFF, "JIT compilation disabled for function")
TREDEF(CUNROLL, "call unroll limit reached")
TREDEF(DOWNREC, "down-recursion, restarting")
TREDEF(NYICF, "NYI: C function %p")