@@ -190,13 +190,17 @@ dump_stack(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer)
190190
191191static void
192192lltrace_instruction (_PyInterpreterFrame * frame ,
193+ _PyStackRef _tos ,
193194 _PyStackRef * stack_pointer ,
194195 _Py_CODEUNIT * next_instr ,
195196 int opcode ,
196197 int oparg )
197198{
198199 int offset = 0 ;
199200 if (frame -> owner < FRAME_OWNED_BY_INTERPRETER ) {
201+ printf ("_tos = " );
202+ dump_item (_tos );
203+ printf ("; " );
200204 dump_stack (frame , stack_pointer );
201205 offset = (int )(next_instr - _PyFrame_GetBytecode (frame ));
202206 }
@@ -943,6 +947,13 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
943947/* This setting is reversed below following _PyEval_EvalFrameDefault */
944948#endif
945949
950+ #ifdef Py_GIL_DISABLED
951+ #define Py_FREE_THREADING 1
952+ #else
953+ #define Py_FREE_THREADING 0
954+ #endif
955+
956+
946957#if Py_TAIL_CALL_INTERP
947958#include "opcode_targets.h"
948959#include "generated_cases.c.h"
@@ -992,7 +1003,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
9921003#endif
9931004 entry_frame .f_executable = PyStackRef_None ;
9941005 entry_frame .instr_ptr = (_Py_CODEUNIT * )_Py_INTERPRETER_TRAMPOLINE_INSTRUCTIONS + 1 ;
995- entry_frame .stackpointer = entry_frame .localsplus ;
1006+ entry_frame .stackpointer = entry_frame .localsplus + 1 ;
9961007 entry_frame .owner = FRAME_OWNED_BY_INTERPRETER ;
9971008 entry_frame .visited = 0 ;
9981009 entry_frame .return_offset = 0 ;
@@ -1039,6 +1050,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
10391050 _PyExecutorObject * current_executor = NULL ;
10401051 const _PyUOpInstruction * next_uop = NULL ;
10411052#endif
1053+ _PyStackRef _tos = PyStackRef_NULL ;
10421054#if Py_TAIL_CALL_INTERP
10431055 return _TAIL_CALL_start_frame (frame , NULL , tstate , NULL , 0 );
10441056#else
0 commit comments