diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 56a3361c5bac84..22f8c644d9d2ee 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -3100,8 +3100,8 @@ dummy_func( assert(tstate->interp->eval_frame == NULL); STORE_SP(); new_frame->previous = frame; - CALL_STAT_INC(inlined_py_calls); frame = tstate->current_frame = new_frame; + CALL_STAT_INC(inlined_py_calls); tstate->py_recursion_remaining--; LOAD_SP(); LOAD_IP(); diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h index 872e0a2b7f92ca..f4a7ea06b1e2bc 100644 --- a/Python/ceval_macros.h +++ b/Python/ceval_macros.h @@ -106,10 +106,10 @@ #define DISPATCH_INLINED(NEW_FRAME) \ do { \ assert(tstate->interp->eval_frame == NULL); \ - _PyFrame_SetStackPointer(frame, stack_pointer); \ + STORE_SP(); \ frame->prev_instr = next_instr - 1; \ (NEW_FRAME)->previous = frame; \ - frame = tstate->current_frame = (NEW_FRAME); \ + frame = tstate->current_frame = (NEW_FRAME); \ CALL_STAT_INC(inlined_py_calls); \ goto start_frame; \ } while (0) diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 7eeef72ac868f3..15a3f16ab84f74 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -2635,8 +2635,8 @@ assert(tstate->interp->eval_frame == NULL); STORE_SP(); new_frame->previous = frame; - CALL_STAT_INC(inlined_py_calls); frame = tstate->current_frame = new_frame; + CALL_STAT_INC(inlined_py_calls); tstate->py_recursion_remaining--; LOAD_SP(); LOAD_IP(); diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index d9adfedf68ca8c..c4d8dbb6c212e6 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -3982,8 +3982,8 @@ assert(tstate->interp->eval_frame == NULL); STORE_SP(); new_frame->previous = frame; - CALL_STAT_INC(inlined_py_calls); frame = tstate->current_frame = new_frame; + CALL_STAT_INC(inlined_py_calls); tstate->py_recursion_remaining--; LOAD_SP(); LOAD_IP(); @@ -4060,8 +4060,8 @@ assert(tstate->interp->eval_frame == NULL); STORE_SP(); new_frame->previous = frame; - CALL_STAT_INC(inlined_py_calls); frame = tstate->current_frame = new_frame; + CALL_STAT_INC(inlined_py_calls); tstate->py_recursion_remaining--; LOAD_SP(); LOAD_IP();