summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h17
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;