@@ -3513,6 +3513,7 @@ dummy_func(
35133513 }
35143514
35153515 op (_MAYBE_EXPAND_METHOD , (callable [1 ], self_or_null [1 ], args [oparg ] -- func [1 ], maybe_self [1 ], args [oparg ])) {
3516+ (void )args ;
35163517 if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
35173518 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
35183519 PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -3879,6 +3880,7 @@ dummy_func(
38793880 _CHECK_PERIODIC ;
38803881
38813882 op (_CHECK_AND_ALLOCATE_OBJECT , (type_version /2 , callable [1 ], null [1 ], args [oparg ] -- init [1 ], self [1 ], args [oparg ])) {
3883+ (void )args ;
38823884 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
38833885 DEOPT_IF (!PyStackRef_IsNull (null [0 ]));
38843886 DEOPT_IF (!PyType_Check (callable_o ));
@@ -4106,7 +4108,7 @@ dummy_func(
41064108 PyObject * res_o = PyLong_FromSsize_t (len_i );
41074109 assert ((res_o != NULL ) ^ (_PyErr_Occurred (tstate ) != NULL ));
41084110 if (res_o == NULL ) {
4109- GOTO_ERROR ( error );
4111+ ERROR_NO_POP ( );
41104112 }
41114113 PyStackRef_CLOSE (arg_stackref );
41124114 DEAD (args );
@@ -4351,6 +4353,7 @@ dummy_func(
43514353 }
43524354
43534355 op (_MAYBE_EXPAND_METHOD_KW , (callable [1 ], self_or_null [1 ], args [oparg ], kwnames_in -- func [1 ], maybe_self [1 ], args [oparg ], kwnames_out )) {
4356+ (void )args ;
43544357 if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
43554358 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
43564359 PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -5009,7 +5012,7 @@ dummy_func(
50095012 if (frame -> lltrace >= 2 ) {
50105013 printf ("SIDE EXIT: [UOp " );
50115014 _PyUOpPrint (& next_uop [-1 ]);
5012- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5015+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
50135016 exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
50145017 (int )(target - _PyFrame_GetBytecode (frame )),
50155018 _PyOpcode_OpName [target -> op .code ]);
@@ -5019,11 +5022,11 @@ dummy_func(
50195022 exit -> temperature = initial_temperature_backoff_counter ();
50205023 Py_CLEAR (exit -> executor );
50215024 }
5025+ tstate -> previous_executor = (PyObject * )current_executor ;
50225026 if (exit -> executor == NULL ) {
50235027 _Py_BackoffCounter temperature = exit -> temperature ;
50245028 if (!backoff_counter_triggers (temperature )) {
50255029 exit -> temperature = advance_backoff_counter (temperature );
5026- tstate -> previous_executor = (PyObject * )current_executor ;
50275030 GOTO_TIER_ONE (target );
50285031 }
50295032 _PyExecutorObject * executor ;
@@ -5036,20 +5039,13 @@ dummy_func(
50365039 int optimized = _PyOptimizer_Optimize (frame , target , stack_pointer , & executor , chain_depth );
50375040 if (optimized <= 0 ) {
50385041 exit -> temperature = restart_backoff_counter (temperature );
5039- if (optimized < 0 ) {
5040- GOTO_UNWIND ();
5041- }
5042- tstate -> previous_executor = (PyObject * )current_executor ;
5043- GOTO_TIER_ONE (target );
5044- }
5045- else {
5046- exit -> temperature = initial_temperature_backoff_counter ();
5042+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
50475043 }
5044+ exit -> temperature = initial_temperature_backoff_counter ();
50485045 }
50495046 exit -> executor = executor ;
50505047 }
50515048 Py_INCREF (exit -> executor );
5052- tstate -> previous_executor = (PyObject * )current_executor ;
50535049 GOTO_TIER_TWO (exit -> executor );
50545050 }
50555051
@@ -5117,7 +5113,7 @@ dummy_func(
51175113 if (frame -> lltrace >= 2 ) {
51185114 printf ("DYNAMIC EXIT: [UOp " );
51195115 _PyUOpPrint (& next_uop [-1 ]);
5120- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5116+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
51215117 exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
51225118 (int )(target - _PyFrame_GetBytecode (frame )),
51235119 _PyOpcode_OpName [target -> op .code ]);
@@ -5137,21 +5133,15 @@ dummy_func(
51375133 int optimized = _PyOptimizer_Optimize (frame , target , stack_pointer , & executor , 0 );
51385134 if (optimized <= 0 ) {
51395135 exit -> temperature = restart_backoff_counter (exit -> temperature );
5140- if (optimized < 0 ) {
5141- GOTO_UNWIND ();
5142- }
5143- GOTO_TIER_ONE (target );
5144- }
5145- else {
5146- exit -> temperature = initial_temperature_backoff_counter ();
5136+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
51475137 }
5138+ exit -> temperature = initial_temperature_backoff_counter ();
51485139 }
51495140 GOTO_TIER_TWO (executor );
51505141 }
51515142
51525143 tier2 op (_START_EXECUTOR , (executor /4 -- )) {
5153- Py_DECREF (tstate -> previous_executor );
5154- tstate -> previous_executor = NULL ;
5144+ Py_CLEAR (tstate -> previous_executor );
51555145#ifndef _Py_JIT
51565146 current_executor = (_PyExecutorObject * )executor ;
51575147#endif
@@ -5177,14 +5167,16 @@ dummy_func(
51775167 }
51785168
51795169 tier2 op (_DEOPT , (-- )) {
5180- EXIT_TO_TIER1 ();
5170+ tstate -> previous_executor = (PyObject * )current_executor ;
5171+ GOTO_TIER_ONE (_PyFrame_GetBytecode (frame ) + CURRENT_TARGET ());
51815172 }
51825173
51835174 tier2 op (_ERROR_POP_N , (target /2 -- )) {
5175+ tstate -> previous_executor = (PyObject * )current_executor ;
51845176 assert (oparg == 0 );
51855177 frame -> instr_ptr = _PyFrame_GetBytecode (frame ) + target ;
51865178 SYNC_SP ();
5187- GOTO_UNWIND ( );
5179+ GOTO_TIER_ONE ( NULL );
51885180 }
51895181
51905182 /* Progress is guaranteed if we DEOPT on the eval breaker, because
0 commit comments