@@ -1015,7 +1015,7 @@ Py_NO_INLINE int
10151015_PyJit_TryInitializeTracing (
10161016 PyThreadState * tstate , _PyInterpreterFrame * frame , _Py_CODEUNIT * curr_instr ,
10171017 _Py_CODEUNIT * start_instr , _Py_CODEUNIT * close_loop_instr , int curr_stackdepth , int chain_depth ,
1018- _PyExitData * exit , int oparg )
1018+ _PyExitData * exit , int oparg , _PyExecutorObject * current_executor )
10191019{
10201020 _PyThreadStateImpl * _tstate = (_PyThreadStateImpl * )tstate ;
10211021 if (_tstate -> jit_tracer_state == NULL ) {
@@ -1062,6 +1062,7 @@ _PyJit_TryInitializeTracing(
10621062 tracer -> initial_state .close_loop_instr = close_loop_instr ;
10631063 tracer -> initial_state .code = (PyCodeObject * )Py_NewRef (code );
10641064 tracer -> initial_state .func = (PyFunctionObject * )Py_NewRef (func );
1065+ tracer -> initial_state .executor = (_PyExecutorObject * )Py_XNewRef (current_executor );
10651066 tracer -> initial_state .exit = exit ;
10661067 tracer -> initial_state .stack_depth = curr_stackdepth ;
10671068 tracer -> initial_state .chain_depth = chain_depth ;
@@ -1089,6 +1090,7 @@ _PyJit_FinalizeTracing(PyThreadState *tstate)
10891090 _PyJitTracerState * tracer = _tstate -> jit_tracer_state ;
10901091 Py_CLEAR (tracer -> initial_state .code );
10911092 Py_CLEAR (tracer -> initial_state .func );
1093+ Py_CLEAR (tracer -> initial_state .executor );
10921094 Py_CLEAR (tracer -> prev_state .instr_code );
10931095 tracer -> prev_state .code_curr_size = CODE_SIZE_EMPTY ;
10941096 tracer -> prev_state .code_max_size = UOP_MAX_TRACE_LENGTH /2 - 1 ;
0 commit comments