@@ -3498,6 +3498,7 @@ dummy_func(
34983498 }
34993499
35003500 op (_MAYBE_EXPAND_METHOD , (callable [1 ], self_or_null [1 ], args [oparg ] -- func [1 ], maybe_self [1 ], args [oparg ])) {
3501+ (void )args ;
35013502 if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
35023503 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
35033504 PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -3864,6 +3865,7 @@ dummy_func(
38643865 _CHECK_PERIODIC ;
38653866
38663867 op (_CHECK_AND_ALLOCATE_OBJECT , (type_version /2 , callable [1 ], null [1 ], args [oparg ] -- init [1 ], self [1 ], args [oparg ])) {
3868+ (void )args ;
38673869 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
38683870 DEOPT_IF (!PyStackRef_IsNull (null [0 ]));
38693871 DEOPT_IF (!PyType_Check (callable_o ));
@@ -4091,7 +4093,7 @@ dummy_func(
40914093 PyObject * res_o = PyLong_FromSsize_t (len_i );
40924094 assert ((res_o != NULL ) ^ (_PyErr_Occurred (tstate ) != NULL ));
40934095 if (res_o == NULL ) {
4094- GOTO_ERROR ( error );
4096+ ERROR_NO_POP ( );
40954097 }
40964098 PyStackRef_CLOSE (arg_stackref );
40974099 DEAD (args );
@@ -4336,6 +4338,7 @@ dummy_func(
43364338 }
43374339
43384340 op (_MAYBE_EXPAND_METHOD_KW , (callable [1 ], self_or_null [1 ], args [oparg ], kwnames_in -- func [1 ], maybe_self [1 ], args [oparg ], kwnames_out )) {
4341+ (void )args ;
43394342 if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
43404343 PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
43414344 PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -4994,7 +4997,7 @@ dummy_func(
49944997 if (frame -> lltrace >= 2 ) {
49954998 printf ("SIDE EXIT: [UOp " );
49964999 _PyUOpPrint (& next_uop [-1 ]);
4997- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5000+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
49985001 exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
49995002 (int )(target - _PyFrame_GetBytecode (frame )),
50005003 _PyOpcode_OpName [target -> op .code ]);
@@ -5004,11 +5007,11 @@ dummy_func(
50045007 exit -> temperature = initial_temperature_backoff_counter ();
50055008 Py_CLEAR (exit -> executor );
50065009 }
5010+ tstate -> previous_executor = (PyObject * )current_executor ;
50075011 if (exit -> executor == NULL ) {
50085012 _Py_BackoffCounter temperature = exit -> temperature ;
50095013 if (!backoff_counter_triggers (temperature )) {
50105014 exit -> temperature = advance_backoff_counter (temperature );
5011- tstate -> previous_executor = (PyObject * )current_executor ;
50125015 GOTO_TIER_ONE (target );
50135016 }
50145017 _PyExecutorObject * executor ;
@@ -5021,20 +5024,13 @@ dummy_func(
50215024 int optimized = _PyOptimizer_Optimize (frame , target , & executor , chain_depth );
50225025 if (optimized <= 0 ) {
50235026 exit -> temperature = restart_backoff_counter (temperature );
5024- if (optimized < 0 ) {
5025- GOTO_UNWIND ();
5026- }
5027- tstate -> previous_executor = (PyObject * )current_executor ;
5028- GOTO_TIER_ONE (target );
5029- }
5030- else {
5031- exit -> temperature = initial_temperature_backoff_counter ();
5027+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
50325028 }
5029+ exit -> temperature = initial_temperature_backoff_counter ();
50335030 }
50345031 exit -> executor = executor ;
50355032 }
50365033 Py_INCREF (exit -> executor );
5037- tstate -> previous_executor = (PyObject * )current_executor ;
50385034 GOTO_TIER_TWO (exit -> executor );
50395035 }
50405036
@@ -5102,7 +5098,7 @@ dummy_func(
51025098 if (frame -> lltrace >= 2 ) {
51035099 printf ("DYNAMIC EXIT: [UOp " );
51045100 _PyUOpPrint (& next_uop [-1 ]);
5105- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5101+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
51065102 exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
51075103 (int )(target - _PyFrame_GetBytecode (frame )),
51085104 _PyOpcode_OpName [target -> op .code ]);
@@ -5122,21 +5118,15 @@ dummy_func(
51225118 int optimized = _PyOptimizer_Optimize (frame , target , & executor , 0 );
51235119 if (optimized <= 0 ) {
51245120 exit -> temperature = restart_backoff_counter (exit -> temperature );
5125- if (optimized < 0 ) {
5126- GOTO_UNWIND ();
5127- }
5128- GOTO_TIER_ONE (target );
5129- }
5130- else {
5131- exit -> temperature = initial_temperature_backoff_counter ();
5121+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
51325122 }
5123+ exit -> temperature = initial_temperature_backoff_counter ();
51335124 }
51345125 GOTO_TIER_TWO (executor );
51355126 }
51365127
51375128 tier2 op (_START_EXECUTOR , (executor /4 -- )) {
5138- Py_DECREF (tstate -> previous_executor );
5139- tstate -> previous_executor = NULL ;
5129+ Py_CLEAR (tstate -> previous_executor );
51405130#ifndef _Py_JIT
51415131 current_executor = (_PyExecutorObject * )executor ;
51425132#endif
@@ -5162,14 +5152,16 @@ dummy_func(
51625152 }
51635153
51645154 tier2 op (_DEOPT , (-- )) {
5165- EXIT_TO_TIER1 ();
5155+ tstate -> previous_executor = (PyObject * )current_executor ;
5156+ GOTO_TIER_ONE (_PyFrame_GetBytecode (frame ) + CURRENT_TARGET ());
51665157 }
51675158
51685159 tier2 op (_ERROR_POP_N , (target /2 -- )) {
5160+ tstate -> previous_executor = (PyObject * )current_executor ;
51695161 assert (oparg == 0 );
51705162 frame -> instr_ptr = _PyFrame_GetBytecode (frame ) + target ;
51715163 SYNC_SP ();
5172- GOTO_UNWIND ( );
5164+ GOTO_TIER_ONE ( NULL );
51735165 }
51745166
51755167 /* Progress is guaranteed if we DEOPT on the eval breaker, because
0 commit comments