aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/ceval_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r--Python/ceval_macros.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index e1d2673848c..187ec8fdd26 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -359,12 +359,12 @@ _PyFrame_SetStackPointer(frame, stack_pointer)
do { \
OPT_STAT_INC(traces_executed); \
_PyExecutorObject *_executor = (EXECUTOR); \
+ tstate->current_executor = (PyObject *)_executor; \
jit_func jitted = _executor->jit_code; \
/* Keep the shim frame alive via the executor: */ \
Py_INCREF(_executor); \
next_instr = jitted(frame, stack_pointer, tstate); \
Py_DECREF(_executor); \
- Py_CLEAR(tstate->previous_executor); \
frame = tstate->current_frame; \
stack_pointer = _PyFrame_GetStackPointer(frame); \
if (next_instr == NULL) { \
@@ -377,7 +377,9 @@ do { \
#define GOTO_TIER_TWO(EXECUTOR) \
do { \
OPT_STAT_INC(traces_executed); \
- next_uop = (EXECUTOR)->trace; \
+ _PyExecutorObject *_executor = (EXECUTOR); \
+ tstate->current_executor = (PyObject *)_executor; \
+ next_uop = _executor->trace; \
assert(next_uop->opcode == _START_EXECUTOR); \
goto enter_tier_two; \
} while (0)
@@ -386,10 +388,11 @@ do { \
#define GOTO_TIER_ONE(TARGET) \
do \
{ \
+ tstate->current_executor = NULL; \
next_instr = (TARGET); \
+ assert(tstate->current_executor == NULL); \
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \
_PyFrame_SetStackPointer(frame, stack_pointer); \
- Py_CLEAR(tstate->previous_executor); \
stack_pointer = _PyFrame_GetStackPointer(frame); \
if (next_instr == NULL) \
{ \