diff options
author | penguin_wwy <940375606@qq.com> | 2023-02-07 22:32:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 22:32:21 (GMT) |
commit | 753fc8a5d64369cd228c3e43fef1811ac3cfde83 (patch) | |
tree | a71d295db633dbe497aa5461d0a410e2792c0e22 /Python/generated_cases.c.h | |
parent | 0d3d5007b136ff1bc0faa960d6526e047dd92396 (diff) | |
download | cpython-753fc8a5d64369cd228c3e43fef1811ac3cfde83.zip cpython-753fc8a5d64369cd228c3e43fef1811ac3cfde83.tar.gz cpython-753fc8a5d64369cd228c3e43fef1811ac3cfde83.tar.bz2 |
gh-101632: Add the new RETURN_CONST opcode (#101633)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index ab19f43..de98b1a 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -742,6 +742,23 @@ goto resume_frame; } + TARGET(RETURN_CONST) { + PyObject *retval = GETITEM(consts, oparg); + Py_INCREF(retval); + assert(EMPTY()); + _PyFrame_SetStackPointer(frame, stack_pointer); + TRACE_FUNCTION_EXIT(); + DTRACE_FUNCTION_EXIT(); + _Py_LeaveRecursiveCallPy(tstate); + assert(frame != &entry_frame); + // GH-99729: We need to unlink the frame *before* clearing it: + _PyInterpreterFrame *dying = frame; + frame = cframe.current_frame = dying->previous; + _PyEvalFrameClearAndPop(tstate, dying); + _PyFrame_StackPush(frame, retval); + goto resume_frame; + } + TARGET(GET_AITER) { PyObject *obj = PEEK(1); PyObject *iter; |