diff options
author | Mark Shannon <mark@hotpy.org> | 2022-06-20 11:59:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 11:59:25 (GMT) |
commit | 45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93 (patch) | |
tree | 2fb6748705e118b6a3cd9264f6b946bcfa06e5e5 /Python/frame.c | |
parent | 774ef28814d0d9d57ec813cb31b0a7af6c476127 (diff) | |
download | cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.zip cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.tar.gz cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.tar.bz2 |
GH-93897: Store frame size in code object and de-opt if insufficient space on thread frame stack. (GH-93908)
Diffstat (limited to 'Python/frame.c')
-rw-r--r-- | Python/frame.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/Python/frame.c b/Python/frame.c index 9eaf41d..206ecab 100644 --- a/Python/frame.c +++ b/Python/frame.c @@ -114,22 +114,6 @@ _PyFrame_Clear(_PyInterpreterFrame *frame) Py_DECREF(frame->f_code); } -/* Consumes reference to func */ -_PyInterpreterFrame * -_PyFrame_Push(PyThreadState *tstate, PyFunctionObject *func) -{ - PyCodeObject *code = (PyCodeObject *)func->func_code; - size_t size = code->co_nlocalsplus + code->co_stacksize + FRAME_SPECIALS_SIZE; - CALL_STAT_INC(frames_pushed); - _PyInterpreterFrame *new_frame = _PyThreadState_BumpFramePointer(tstate, size); - if (new_frame == NULL) { - Py_DECREF(func); - return NULL; - } - _PyFrame_InitializeSpecials(new_frame, func, NULL, code->co_nlocalsplus); - return new_frame; -} - int _PyInterpreterFrame_GetLine(_PyInterpreterFrame *frame) { |