assert(executor != tstate->interp->cold_executor);
tstate->jit_exit = NULL;
if (IS_JIT_TRACING()) {
- RECORD_TRACE();
- BAIL_TRACING_NO_DISPATCH();
+ int old_opcode = executor->vm_data.opcode;
+ int old_oparg = (oparg & ~255) | executor->vm_data.oparg;
+ RECORD_TRACE_NO_DISPATCH();
+ opcode = old_opcode;
+ oparg = old_oparg;
+ next_instr = this_instr;
+ DISPATCH_GOTO();
}
TIER1_TO_TIER2(executor, 1);
#else
# define BAIL_TRACING_NO_DISPATCH() \
LEAVE_TRACING(); \
int err = _PyOptimizer_Optimize(frame, tstate); \
- tstate->interp->jit_tracer_code_curr_size = 0; \
if (err < 0) { \
JUMP_TO_LABEL(error); \
}
BAIL_TRACING(); \
} \
} while (0);
+# define RECORD_TRACE_NO_DISPATCH() do { \
+ frame->instr_ptr = next_instr; \
+ if (add_to_code_trace(tstate, frame, old_code, this_instr, next_instr, opcode, oparg, _jump_taken)) { \
+ BAIL_TRACING_NO_DISPATCH(); \
+ } \
+ } while (0);
#endif
assert(executor != tstate->interp->cold_executor);
tstate->jit_exit = NULL;
if (IS_JIT_TRACING()) {
- RECORD_TRACE();
- BAIL_TRACING_NO_DISPATCH();
+ int old_opcode = executor->vm_data.opcode;
+ int old_oparg = (oparg & ~255) | executor->vm_data.oparg;
+ RECORD_TRACE_NO_DISPATCH();
+ opcode = old_opcode;
+ oparg = old_oparg;
+ next_instr = this_instr;
+ DISPATCH_GOTO();
}
TIER1_TO_TIER2(executor, 1);
#else
assert(executor != tstate->interp->cold_executor);
tstate->jit_exit = NULL;
if (IS_JIT_TRACING()) {
- RECORD_TRACE();
- BAIL_TRACING_NO_DISPATCH();
+ int old_opcode = executor->vm_data.opcode;
+ int old_oparg = (oparg & ~255) | executor->vm_data.oparg;
+ RECORD_TRACE_NO_DISPATCH();
+ opcode = old_opcode;
+ oparg = old_oparg;
+ next_instr = this_instr;
+ DISPATCH_GOTO();
}
TIER1_TO_TIER2(executor, 1);
#else