@@ -4592,28 +4592,25 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
45924592 // Check if the call can be inlined or not
45934593 if (Py_TYPE (function ) == & PyFunction_Type && tstate -> interp -> eval_frame == NULL ) {
45944594 int code_flags = ((PyCodeObject * )PyFunction_GET_CODE (function ))-> co_flags ;
4595- int is_generator = code_flags & (CO_GENERATOR | CO_COROUTINE | CO_ASYNC_GENERATOR );
4596- if (!is_generator ) {
4597- PyObject * locals = code_flags & CO_OPTIMIZED ? NULL : PyFunction_GET_GLOBALS (function );
4598- STACK_SHRINK (oparg );
4599- InterpreterFrame * new_frame = _PyEvalFramePushAndInit (
4600- tstate , (PyFunctionObject * )function , locals ,
4601- stack_pointer , nargs , kwnames
4602- );
4603- STACK_SHRINK (postcall_shrink );
4604- RESET_STACK_ADJUST_FOR_CALLS ;
4605- // The frame has stolen all the arguments from the stack,
4606- // so there is no need to clean them up.
4607- Py_XDECREF (kwnames );
4608- Py_DECREF (function );
4609- if (new_frame == NULL ) {
4610- goto error ;
4611- }
4612- _PyFrame_SetStackPointer (frame , stack_pointer );
4613- new_frame -> previous = frame ;
4614- cframe .current_frame = frame = new_frame ;
4615- goto start_frame ;
4595+ PyObject * locals = code_flags & CO_OPTIMIZED ? NULL : PyFunction_GET_GLOBALS (function );
4596+ STACK_SHRINK (oparg );
4597+ InterpreterFrame * new_frame = _PyEvalFramePushAndInit (
4598+ tstate , (PyFunctionObject * )function , locals ,
4599+ stack_pointer , nargs , kwnames
4600+ );
4601+ STACK_SHRINK (postcall_shrink );
4602+ RESET_STACK_ADJUST_FOR_CALLS ;
4603+ // The frame has stolen all the arguments from the stack,
4604+ // so there is no need to clean them up.
4605+ Py_XDECREF (kwnames );
4606+ Py_DECREF (function );
4607+ if (new_frame == NULL ) {
4608+ goto error ;
46164609 }
4610+ _PyFrame_SetStackPointer (frame , stack_pointer );
4611+ new_frame -> previous = frame ;
4612+ cframe .current_frame = frame = new_frame ;
4613+ goto start_frame ;
46174614 }
46184615 /* Callable is not a normal Python function */
46194616 PyObject * res ;
0 commit comments