diff options
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index cfa48ecf..df428818 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "lj_snap.h" | 33 | #include "lj_snap.h" |
34 | #include "lj_dispatch.h" | 34 | #include "lj_dispatch.h" |
35 | #include "lj_vm.h" | 35 | #include "lj_vm.h" |
36 | #include "lj_prng.h" | ||
36 | 37 | ||
37 | /* Some local macros to save typing. Undef'd at the end. */ | 38 | /* Some local macros to save typing. Undef'd at the end. */ |
38 | #define IR(ref) (&J->cur.ir[(ref)]) | 39 | #define IR(ref) (&J->cur.ir[(ref)]) |
@@ -1696,7 +1697,7 @@ static void check_call_unroll(jit_State *J, TraceNo lnk) | |||
1696 | if (lnk) { /* Possible tail- or up-recursion. */ | 1697 | if (lnk) { /* Possible tail- or up-recursion. */ |
1697 | lj_trace_flush(J, lnk); /* Flush trace that only returns. */ | 1698 | lj_trace_flush(J, lnk); /* Flush trace that only returns. */ |
1698 | /* Set a small, pseudo-random hotcount for a quick retry of JFUNC*. */ | 1699 | /* Set a small, pseudo-random hotcount for a quick retry of JFUNC*. */ |
1699 | hotcount_set(J2GG(J), J->pc+1, LJ_PRNG_BITS(J, 4)); | 1700 | hotcount_set(J2GG(J), J->pc+1, lj_prng_u64(&J2G(J)->prng) & 15u); |
1700 | } | 1701 | } |
1701 | lj_trace_err(J, LJ_TRERR_CUNROLL); | 1702 | lj_trace_err(J, LJ_TRERR_CUNROLL); |
1702 | } | 1703 | } |