소스 검색

Another loop formation test must check for return to lower frame.

Mike Pall 16 년 전
부모
커밋
305ecbbb84
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/lj_record.c

+ 1 - 1
src/lj_record.c

@@ -401,7 +401,7 @@ static void rec_loop_jit(jit_State *J, TraceNo lnk, LoopEvent ev)
     lj_trace_err(J, LJ_TRERR_LINNER);
     lj_trace_err(J, LJ_TRERR_LINNER);
   } else if (ev != LOOPEV_LEAVE) {  /* Side trace enters a compiled loop. */
   } else if (ev != LOOPEV_LEAVE) {  /* Side trace enters a compiled loop. */
     J->instunroll = 0;  /* Cannot continue across a compiled loop op. */
     J->instunroll = 0;  /* Cannot continue across a compiled loop op. */
-    if (J->pc == J->startpc && J->framedepth == 0)
+    if (J->pc == J->startpc && J->framedepth == 0 && !J->chain[IR_RETF])
       lnk = J->curtrace;  /* Can form an extra loop. */
       lnk = J->curtrace;  /* Can form an extra loop. */
     rec_stop(J, lnk);  /* Link to the loop. */
     rec_stop(J, lnk);  /* Link to the loop. */
   }  /* Side trace continues across a loop that's left or not entered. */
   }  /* Side trace continues across a loop that's left or not entered. */