mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)
This commit is contained in:
parent
19b7ead5eb
commit
7dd3c2b800
3 changed files with 4 additions and 4 deletions
|
|
@ -282,7 +282,7 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func, int null_l
|
||||||
/* Pushes a trampoline frame without checking for space.
|
/* Pushes a trampoline frame without checking for space.
|
||||||
* Must be guarded by _PyThreadState_HasStackSpace() */
|
* Must be guarded by _PyThreadState_HasStackSpace() */
|
||||||
static inline _PyInterpreterFrame *
|
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);
|
CALL_STAT_INC(frames_pushed);
|
||||||
_PyInterpreterFrame *frame = (_PyInterpreterFrame *)tstate->datastack_top;
|
_PyInterpreterFrame *frame = (_PyInterpreterFrame *)tstate->datastack_top;
|
||||||
|
|
@ -297,7 +297,7 @@ _PyFrame_PushTrampolineUnchecked(PyThreadState *tstate, PyCodeObject *code, int
|
||||||
frame->f_locals = NULL;
|
frame->f_locals = NULL;
|
||||||
frame->stacktop = code->co_nlocalsplus + stackdepth;
|
frame->stacktop = code->co_nlocalsplus + stackdepth;
|
||||||
frame->frame_obj = NULL;
|
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->owner = FRAME_OWNED_BY_THREAD;
|
||||||
frame->return_offset = 0;
|
frame->return_offset = 0;
|
||||||
return frame;
|
return frame;
|
||||||
|
|
|
||||||
|
|
@ -3204,7 +3204,7 @@ dummy_func(
|
||||||
}
|
}
|
||||||
Py_DECREF(tp);
|
Py_DECREF(tp);
|
||||||
_PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
|
_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);
|
assert(_PyCode_CODE((PyCodeObject *)shim->f_executable)[1].op.code == EXIT_INIT_CHECK);
|
||||||
/* Push self onto stack of shim */
|
/* Push self onto stack of shim */
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
|
|
|
||||||
2
Python/generated_cases.c.h
generated
2
Python/generated_cases.c.h
generated
|
|
@ -4176,7 +4176,7 @@
|
||||||
}
|
}
|
||||||
Py_DECREF(tp);
|
Py_DECREF(tp);
|
||||||
_PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
|
_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);
|
assert(_PyCode_CODE((PyCodeObject *)shim->f_executable)[1].op.code == EXIT_INIT_CHECK);
|
||||||
/* Push self onto stack of shim */
|
/* Push self onto stack of shim */
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue