]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix call unroll checks in the presence of metamethod frames.
authorMike Pall <mike>
Sun, 8 Dec 2013 23:29:56 +0000 (00:29 +0100)
committerMike Pall <mike>
Sun, 8 Dec 2013 23:29:56 +0000 (00:29 +0100)
src/lj_record.c

index 30b9efc1507adbbc5ff5548ddf6da015eaca834d..154ff3805d638ebe94a36b1892dbf44a02961f05 100644 (file)
@@ -1389,6 +1389,7 @@ static void check_call_unroll(jit_State *J, TraceNo lnk)
   int32_t count = 0;
   if ((J->pt->flags & PROTO_VARARG)) depth--;  /* Vararg frame still missing. */
   for (; depth > 0; depth--) {  /* Count frames with same prototype. */
+    if (frame_iscont(frame)) depth--;
     frame = frame_prev(frame);
     if (mref(frame_func(frame)->l.pc, void) == pc)
       count++;