@@ -3526,6 +3526,7 @@ dummy_func(
3526
3526
}
3527
3527
3528
3528
op (_MAYBE_EXPAND_METHOD , (callable [1 ], self_or_null [1 ], args [oparg ] -- func [1 ], maybe_self [1 ], args [oparg ])) {
3529
+ (void )args ;
3529
3530
if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
3530
3531
PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
3531
3532
PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -3892,6 +3893,7 @@ dummy_func(
3892
3893
_CHECK_PERIODIC ;
3893
3894
3894
3895
op (_CHECK_AND_ALLOCATE_OBJECT , (type_version /2 , callable [1 ], null [1 ], args [oparg ] -- init [1 ], self [1 ], args [oparg ])) {
3896
+ (void )args ;
3895
3897
PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
3896
3898
DEOPT_IF (!PyStackRef_IsNull (null [0 ]));
3897
3899
DEOPT_IF (!PyType_Check (callable_o ));
@@ -4119,7 +4121,7 @@ dummy_func(
4119
4121
PyObject * res_o = PyLong_FromSsize_t (len_i );
4120
4122
assert ((res_o != NULL ) ^ (_PyErr_Occurred (tstate ) != NULL ));
4121
4123
if (res_o == NULL ) {
4122
- GOTO_ERROR ( error );
4124
+ ERROR_NO_POP ( );
4123
4125
}
4124
4126
PyStackRef_CLOSE (arg_stackref );
4125
4127
DEAD (args );
@@ -4364,6 +4366,7 @@ dummy_func(
4364
4366
}
4365
4367
4366
4368
op (_MAYBE_EXPAND_METHOD_KW , (callable [1 ], self_or_null [1 ], args [oparg ], kwnames_in -- func [1 ], maybe_self [1 ], args [oparg ], kwnames_out )) {
4369
+ (void )args ;
4367
4370
if (PyStackRef_TYPE (callable [0 ]) == & PyMethod_Type && PyStackRef_IsNull (self_or_null [0 ])) {
4368
4371
PyObject * callable_o = PyStackRef_AsPyObjectBorrow (callable [0 ]);
4369
4372
PyObject * self = ((PyMethodObject * )callable_o )-> im_self ;
@@ -5022,7 +5025,7 @@ dummy_func(
5022
5025
if (frame -> lltrace >= 2 ) {
5023
5026
printf ("SIDE EXIT: [UOp " );
5024
5027
_PyUOpPrint (& next_uop [-1 ]);
5025
- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5028
+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
5026
5029
exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
5027
5030
(int )(target - _PyFrame_GetBytecode (frame )),
5028
5031
_PyOpcode_OpName [target -> op .code ]);
@@ -5032,11 +5035,11 @@ dummy_func(
5032
5035
exit -> temperature = initial_temperature_backoff_counter ();
5033
5036
Py_CLEAR (exit -> executor );
5034
5037
}
5038
+ tstate -> previous_executor = (PyObject * )current_executor ;
5035
5039
if (exit -> executor == NULL ) {
5036
5040
_Py_BackoffCounter temperature = exit -> temperature ;
5037
5041
if (!backoff_counter_triggers (temperature )) {
5038
5042
exit -> temperature = advance_backoff_counter (temperature );
5039
- tstate -> previous_executor = (PyObject * )current_executor ;
5040
5043
GOTO_TIER_ONE (target );
5041
5044
}
5042
5045
_PyExecutorObject * executor ;
@@ -5049,20 +5052,13 @@ dummy_func(
5049
5052
int optimized = _PyOptimizer_Optimize (frame , target , & executor , chain_depth );
5050
5053
if (optimized <= 0 ) {
5051
5054
exit -> temperature = restart_backoff_counter (temperature );
5052
- if (optimized < 0 ) {
5053
- GOTO_UNWIND ();
5054
- }
5055
- tstate -> previous_executor = (PyObject * )current_executor ;
5056
- GOTO_TIER_ONE (target );
5057
- }
5058
- else {
5059
- exit -> temperature = initial_temperature_backoff_counter ();
5055
+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
5060
5056
}
5057
+ exit -> temperature = initial_temperature_backoff_counter ();
5061
5058
}
5062
5059
exit -> executor = executor ;
5063
5060
}
5064
5061
Py_INCREF (exit -> executor );
5065
- tstate -> previous_executor = (PyObject * )current_executor ;
5066
5062
GOTO_TIER_TWO (exit -> executor );
5067
5063
}
5068
5064
@@ -5130,7 +5126,7 @@ dummy_func(
5130
5126
if (frame -> lltrace >= 2 ) {
5131
5127
printf ("DYNAMIC EXIT: [UOp " );
5132
5128
_PyUOpPrint (& next_uop [-1 ]);
5133
- printf (", exit %u , temp %d, target %d -> %s]\n" ,
5129
+ printf (", exit %lu , temp %d, target %d -> %s]\n" ,
5134
5130
exit - current_executor -> exits , exit -> temperature .value_and_backoff ,
5135
5131
(int )(target - _PyFrame_GetBytecode (frame )),
5136
5132
_PyOpcode_OpName [target -> op .code ]);
@@ -5150,21 +5146,15 @@ dummy_func(
5150
5146
int optimized = _PyOptimizer_Optimize (frame , target , & executor , 0 );
5151
5147
if (optimized <= 0 ) {
5152
5148
exit -> temperature = restart_backoff_counter (exit -> temperature );
5153
- if (optimized < 0 ) {
5154
- GOTO_UNWIND ();
5155
- }
5156
- GOTO_TIER_ONE (target );
5157
- }
5158
- else {
5159
- exit -> temperature = initial_temperature_backoff_counter ();
5149
+ GOTO_TIER_ONE (optimized < 0 ? NULL : target );
5160
5150
}
5151
+ exit -> temperature = initial_temperature_backoff_counter ();
5161
5152
}
5162
5153
GOTO_TIER_TWO (executor );
5163
5154
}
5164
5155
5165
5156
tier2 op (_START_EXECUTOR , (executor /4 -- )) {
5166
- Py_DECREF (tstate -> previous_executor );
5167
- tstate -> previous_executor = NULL ;
5157
+ Py_CLEAR (tstate -> previous_executor );
5168
5158
#ifndef _Py_JIT
5169
5159
current_executor = (_PyExecutorObject * )executor ;
5170
5160
#endif
@@ -5190,14 +5180,16 @@ dummy_func(
5190
5180
}
5191
5181
5192
5182
tier2 op (_DEOPT , (-- )) {
5193
- EXIT_TO_TIER1 ();
5183
+ tstate -> previous_executor = (PyObject * )current_executor ;
5184
+ GOTO_TIER_ONE (_PyFrame_GetBytecode (frame ) + CURRENT_TARGET ());
5194
5185
}
5195
5186
5196
5187
tier2 op (_ERROR_POP_N , (target /2 -- )) {
5188
+ tstate -> previous_executor = (PyObject * )current_executor ;
5197
5189
assert (oparg == 0 );
5198
5190
frame -> instr_ptr = _PyFrame_GetBytecode (frame ) + target ;
5199
5191
SYNC_SP ();
5200
- GOTO_UNWIND ( );
5192
+ GOTO_TIER_ONE ( NULL );
5201
5193
}
5202
5194
5203
5195
/* Progress is guaranteed if we DEOPT on the eval breaker, because
0 commit comments