diff options
Diffstat (limited to 'src/lj_trace.c')
-rw-r--r-- | src/lj_trace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index ce313df3..0bd32b1e 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
@@ -146,7 +146,7 @@ void lj_trace_freeproto(global_State *g, GCproto *pt) | |||
146 | void lj_trace_reenableproto(GCproto *pt) | 146 | void lj_trace_reenableproto(GCproto *pt) |
147 | { | 147 | { |
148 | if ((pt->flags & PROTO_HAS_ILOOP)) { | 148 | if ((pt->flags & PROTO_HAS_ILOOP)) { |
149 | BCIns *bc = pt->bc; | 149 | BCIns *bc = proto_bc(pt); |
150 | BCPos i, sizebc = pt->sizebc;; | 150 | BCPos i, sizebc = pt->sizebc;; |
151 | pt->flags &= ~PROTO_HAS_ILOOP; | 151 | pt->flags &= ~PROTO_HAS_ILOOP; |
152 | for (i = 0; i < sizebc; i++) { | 152 | for (i = 0; i < sizebc; i++) { |
@@ -323,7 +323,7 @@ static void trace_start(jit_State *J) | |||
323 | 323 | ||
324 | if ((J->pt->flags & PROTO_NO_JIT)) { /* JIT disabled for this proto? */ | 324 | if ((J->pt->flags & PROTO_NO_JIT)) { /* JIT disabled for this proto? */ |
325 | if (J->parent == 0) { | 325 | if (J->parent == 0) { |
326 | if (J->pc >= J->pt->bc) { | 326 | if (J->pc >= proto_bc(J->pt)) { |
327 | /* Lazy bytecode patching to disable hotcount events. */ | 327 | /* Lazy bytecode patching to disable hotcount events. */ |
328 | setbc_op(J->pc, (int)bc_op(*J->pc)+(int)BC_ILOOP-(int)BC_LOOP); | 328 | setbc_op(J->pc, (int)bc_op(*J->pc)+(int)BC_ILOOP-(int)BC_LOOP); |
329 | J->pt->flags |= PROTO_HAS_ILOOP; | 329 | J->pt->flags |= PROTO_HAS_ILOOP; |
@@ -361,7 +361,7 @@ static void trace_start(jit_State *J) | |||
361 | setstrV(L, L->top++, lj_str_newlit(L, "start")); | 361 | setstrV(L, L->top++, lj_str_newlit(L, "start")); |
362 | setintV(L->top++, J->curtrace); | 362 | setintV(L->top++, J->curtrace); |
363 | setfuncV(L, L->top++, J->fn); | 363 | setfuncV(L, L->top++, J->fn); |
364 | setintV(L->top++, J->pc - J->pt->bc + 1); | 364 | setintV(L->top++, proto_bcpos(J->pt, J->pc) + 1); |
365 | if (J->parent) { | 365 | if (J->parent) { |
366 | setintV(L->top++, J->parent); | 366 | setintV(L->top++, J->parent); |
367 | setintV(L->top++, J->exitno); | 367 | setintV(L->top++, J->exitno); |
@@ -444,7 +444,7 @@ static int trace_abort(jit_State *J) | |||
444 | setstrV(L, L->top++, lj_str_newlit(L, "abort")); | 444 | setstrV(L, L->top++, lj_str_newlit(L, "abort")); |
445 | setintV(L->top++, J->curtrace); | 445 | setintV(L->top++, J->curtrace); |
446 | setfuncV(L, L->top++, J->fn); | 446 | setfuncV(L, L->top++, J->fn); |
447 | setintV(L->top++, J->pc - J->pt->bc + 1); | 447 | setintV(L->top++, proto_bcpos(J->pt, J->pc) + 1); |
448 | copyTV(L, L->top++, restorestack(L, errobj)); | 448 | copyTV(L, L->top++, restorestack(L, errobj)); |
449 | copyTV(L, L->top++, &J->errinfo); | 449 | copyTV(L, L->top++, &J->errinfo); |
450 | ); | 450 | ); |
@@ -478,7 +478,7 @@ static TValue *trace_state(lua_State *L, lua_CFunction dummy, void *ud) | |||
478 | lj_vmevent_send(L, RECORD, | 478 | lj_vmevent_send(L, RECORD, |
479 | setintV(L->top++, J->curtrace); | 479 | setintV(L->top++, J->curtrace); |
480 | setfuncV(L, L->top++, J->fn); | 480 | setfuncV(L, L->top++, J->fn); |
481 | setintV(L->top++, J->pc - J->pt->bc + 1); | 481 | setintV(L->top++, proto_bcpos(J->pt, J->pc) + 1); |
482 | setintV(L->top++, J->framedepth); | 482 | setintV(L->top++, J->framedepth); |
483 | if (bcmode_mm(bc_op(*J->pc)) == MM_call) { | 483 | if (bcmode_mm(bc_op(*J->pc)) == MM_call) { |
484 | cTValue *o = &L->base[bc_a(*J->pc)]; | 484 | cTValue *o = &L->base[bc_a(*J->pc)]; |