@@ -4159,32 +4159,34 @@ dummy_func(
4159
4159
_PyExitData * exit = & previous -> exits [oparg ];
4160
4160
PyCodeObject * code = _PyFrame_GetCode (frame );
4161
4161
_Py_CODEUNIT * target = _PyCode_CODE (code ) + exit -> target ;
4162
- if (! ADAPTIVE_COUNTER_IS_ZERO ( exit -> temperature )) {
4163
- DECREMENT_ADAPTIVE_COUNTER ( exit -> temperature );
4164
- GOTO_TIER_ONE ( target ) ;
4165
- }
4166
- _PyExecutorObject * executor ;
4167
- if ( target -> op . code == ENTER_EXECUTOR ) {
4168
- executor = code -> co_executors -> executors [ target -> op . arg ];
4169
- Py_INCREF ( executor );
4170
- }
4171
- else {
4172
- int optimized = _PyOptimizer_Optimize ( frame , target , stack_pointer , & executor );
4173
- if (optimized <= 0 ) {
4174
- exit -> temperature = adaptive_counter_backoff ( exit -> temperature );
4175
- if ( optimized < 0 ) {
4176
- Py_DECREF ( previous );
4177
- tstate -> previous_executor = Py_None ;
4178
- GOTO_UNWIND ( );
4162
+ # if ENABLE_SPECIALIZATION
4163
+ if ( ADAPTIVE_COUNTER_IS_ZERO ( exit -> temperature )) {
4164
+ _PyExecutorObject * executor ;
4165
+ if ( target -> op . code == ENTER_EXECUTOR ) {
4166
+ executor = code -> co_executors -> executors [ target -> op . arg ] ;
4167
+ Py_INCREF ( executor );
4168
+ }
4169
+ else {
4170
+ int optimized = _PyOptimizer_Optimize ( frame , target , stack_pointer , & executor );
4171
+ if ( optimized <= 0 ) {
4172
+ exit -> temperature = adaptive_counter_backoff ( exit -> temperature );
4173
+ if (optimized < 0 ) {
4174
+ Py_DECREF ( previous );
4175
+ tstate -> previous_executor = Py_None ;
4176
+ GOTO_UNWIND ( );
4177
+ }
4178
+ GOTO_TIER_ONE ( target );
4179
4179
}
4180
- GOTO_TIER_ONE (target );
4181
4180
}
4181
+ /* We need two references. One to store in exit->executor and
4182
+ * one to keep the executor alive when executing. */
4183
+ Py_INCREF (executor );
4184
+ exit -> executor = executor ;
4185
+ GOTO_TIER_TWO (executor );
4182
4186
}
4183
- /* We need two references. One to store in exit->executor and
4184
- * one to keep the executor alive when executing. */
4185
- Py_INCREF (executor );
4186
- exit -> executor = executor ;
4187
- GOTO_TIER_TWO (executor );
4187
+ DECREMENT_ADAPTIVE_COUNTER (exit -> temperature );
4188
+ #endif
4189
+ GOTO_TIER_ONE (target );
4188
4190
}
4189
4191
4190
4192
tier2 op (_START_EXECUTOR , (executor /4 -- )) {
0 commit comments