diff options
author | Mike Pall <mike> | 2015-05-19 01:59:29 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2015-05-19 01:59:29 +0200 |
commit | b82fc3ddc032dfc3da813cda9715d356975922e7 (patch) | |
tree | 21e5a68db18a8b3bc339c0e1b3a5c8825ab1e75a /src/lj_trace.c | |
parent | d8cfc370ef182ff3240ffd1e27e33d4594fde658 (diff) | |
download | luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.tar.gz luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.tar.bz2 luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.zip |
Bump table allocations retroactively if they grow later on.
Diffstat (limited to 'src/lj_trace.c')
-rw-r--r-- | src/lj_trace.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index 39ff0461..79c50b0a 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
@@ -394,6 +394,7 @@ static void trace_start(jit_State *J) | |||
394 | J->guardemit.irt = 0; | 394 | J->guardemit.irt = 0; |
395 | J->postproc = LJ_POST_NONE; | 395 | J->postproc = LJ_POST_NONE; |
396 | lj_resetsplit(J); | 396 | lj_resetsplit(J); |
397 | J->retryrec = 0; | ||
397 | setgcref(J->cur.startpt, obj2gco(J->pt)); | 398 | setgcref(J->cur.startpt, obj2gco(J->pt)); |
398 | 399 | ||
399 | L = J->L; | 400 | L = J->L; |
@@ -510,10 +511,15 @@ static int trace_abort(jit_State *J) | |||
510 | } | 511 | } |
511 | /* Penalize or blacklist starting bytecode instruction. */ | 512 | /* Penalize or blacklist starting bytecode instruction. */ |
512 | if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))) { | 513 | if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))) { |
513 | if (J->exitno == 0) | 514 | if (J->exitno == 0) { |
514 | penalty_pc(J, &gcref(J->cur.startpt)->pt, mref(J->cur.startpc, BCIns), e); | 515 | BCIns *startpc = mref(J->cur.startpc, BCIns); |
515 | else | 516 | if (e == LJ_TRERR_RETRY) |
517 | hotcount_set(J2GG(J), startpc+1, 1); /* Immediate retry. */ | ||
518 | else | ||
519 | penalty_pc(J, &gcref(J->cur.startpt)->pt, startpc, e); | ||
520 | } else { | ||
516 | traceref(J, J->exitno)->link = J->exitno; /* Self-link is blacklisted. */ | 521 | traceref(J, J->exitno)->link = J->exitno; /* Self-link is blacklisted. */ |
522 | } | ||
517 | } | 523 | } |
518 | 524 | ||
519 | /* Is there anything to abort? */ | 525 | /* Is there anything to abort? */ |