]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Thu, 12 Oct 2023 10:02:42 +0000 (12:02 +0200)
committerGitHub <noreply@github.com>
Thu, 12 Oct 2023 10:02:42 +0000 (11:02 +0100)
Include/internal/pycore_frame.h
Python/bytecodes.c
Python/generated_cases.c.h

index c8fad1562d8443affb1d3bb84e17f86f26d4143a..bd448272e058ab9ee756f01da3b92932a4b7b3d0 100644 (file)
@@ -282,7 +282,7 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func, int null_l
 /* Pushes a trampoline frame without checking for space.
  * Must be guarded by _PyThreadState_HasStackSpace() */
 static inline _PyInterpreterFrame *
-_PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int stackdepth, int prev_instr)
+_PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int stackdepth)
 {
     CALL_STAT_INC(frames_pushed);
     _PyInterpreterFrame *frame = (_PyInterpreterFrame *)tstate->datastack_top;
@@ -297,7 +297,7 @@ _PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int
     frame->f_locals = NULL;
     frame->stacktop = code->co_nlocalsplus + stackdepth;
     frame->frame_obj = NULL;
-    frame->prev_instr = _PyCode_CODE(code) + prev_instr;
+    frame->prev_instr = _PyCode_CODE(code);
     frame->owner = FRAME_OWNED_BY_THREAD;
     frame->return_offset = 0;
     return frame;
index 62dc548abd692b2e5421135455ea24802c82028f..d7e2ecdd24dceef30afb98b104e84110ce4681b6 100644 (file)
@@ -3204,7 +3204,7 @@ dummy_func(
             }
             Py_DECREF(tp);
             _PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
-                tstate, (PyCodeObject *)&_Py_InitCleanup, 1, 0);
+                tstate, (PyCodeObject *)&_Py_InitCleanup, 1);
             assert(_PyCode_CODE((PyCodeObject *)shim->f_executable)[1].op.code == EXIT_INIT_CHECK);
             /* Push self onto stack of shim */
             Py_INCREF(self);
index 8ae9bd2f457a946b136b1ba3442a7135106095b5..6fbe80fe03a128e2234347a722537abb2580b48a 100644 (file)
             }
             Py_DECREF(tp);
             _PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
-                tstate, (PyCodeObject *)&_Py_InitCleanup, 1, 0);
+                tstate, (PyCodeObject *)&_Py_InitCleanup, 1);
             assert(_PyCode_CODE((PyCodeObject *)shim->f_executable)[1].op.code == EXIT_INIT_CHECK);
             /* Push self onto stack of shim */
             Py_INCREF(self);