diff options
author | Mike Pall <mike> | 2018-10-14 15:21:37 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2018-10-14 15:21:37 +0200 |
commit | 0a9ff94c4a1fcec2c310dcb092da694f23186e23 (patch) | |
tree | 1371466a06953b55d48df7e664e03cf20d10e50c /src | |
parent | 9c1b637898f38dd4606da08ba1a82a174c3e64b6 (diff) | |
download | luajit-0a9ff94c4a1fcec2c310dcb092da694f23186e23.tar.gz luajit-0a9ff94c4a1fcec2c310dcb092da694f23186e23.tar.bz2 luajit-0a9ff94c4a1fcec2c310dcb092da694f23186e23.zip |
Actually implement maxirconst trace limit.
Suggested by spacewander.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_record.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 1a2b1c5d..7f37d6c6 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -2470,8 +2470,9 @@ void lj_record_ins(jit_State *J) | |||
2470 | #undef rbv | 2470 | #undef rbv |
2471 | #undef rcv | 2471 | #undef rcv |
2472 | 2472 | ||
2473 | /* Limit the number of recorded IR instructions. */ | 2473 | /* Limit the number of recorded IR instructions and constants. */ |
2474 | if (J->cur.nins > REF_FIRST+(IRRef)J->param[JIT_P_maxrecord]) | 2474 | if (J->cur.nins > REF_FIRST+(IRRef)J->param[JIT_P_maxrecord] || |
2475 | J->cur.nk < REF_BIAS-(IRRef)J->param[JIT_P_maxirconst]) | ||
2475 | lj_trace_err(J, LJ_TRERR_TRACEOV); | 2476 | lj_trace_err(J, LJ_TRERR_TRACEOV); |
2476 | } | 2477 | } |
2477 | 2478 | ||