summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-01-21 10:15:02 (GMT)
committerGitHub <noreply@github.com>2025-01-21 10:15:02 (GMT)
commitf5b6356a11bde64ac1e08478dd5ee7c47da653d8 (patch)
treef9367b879f47e48c03b0dbe66a9d573302f87764 /Python/generated_cases.c.h
parentd3b1bb228c951f8245f36ee28d9b175786522730 (diff)
downloadcpython-f5b6356a11bde64ac1e08478dd5ee7c47da653d8.zip
cpython-f5b6356a11bde64ac1e08478dd5ee7c47da653d8.tar.gz
cpython-f5b6356a11bde64ac1e08478dd5ee7c47da653d8.tar.bz2
GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)
Add new frame owner type for interpreter entry frames
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index f25c9a9..a8dbcab 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -5046,9 +5046,7 @@
// _RETURN_VALUE
{
retval = val;
- #if TIER_ONE
- assert(frame != &entry_frame);
- #endif
+ assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
_PyStackRef temp = retval;
stack_pointer += -1;
assert(WITHIN_STACK_BOUNDS());
@@ -5100,9 +5098,7 @@
// NOTE: It's important that YIELD_VALUE never raises an exception!
// The compiler treats any exception raised here as a failed close()
// or throw() call.
- #if TIER_ONE
- assert(frame != &entry_frame);
- #endif
+ assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
frame->instr_ptr++;
PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame);
assert(FRAME_SUSPENDED_YIELD_FROM == FRAME_SUSPENDED + 1);
@@ -5145,7 +5141,7 @@
INSTRUCTION_STATS(INTERPRETER_EXIT);
_PyStackRef retval;
retval = stack_pointer[-1];
- assert(frame == &entry_frame);
+ assert(frame->owner == FRAME_OWNED_BY_INTERPRETER);
assert(_PyFrame_IsIncomplete(frame));
/* Restore previous frame and return. */
tstate->current_frame = frame->previous;
@@ -7309,9 +7305,7 @@
_PyStackRef retval;
_PyStackRef res;
retval = stack_pointer[-1];
- #if TIER_ONE
- assert(frame != &entry_frame);
- #endif
+ assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
_PyStackRef temp = retval;
stack_pointer += -1;
assert(WITHIN_STACK_BOUNDS());
@@ -7364,7 +7358,7 @@
v = stack_pointer[-1];
PyObject *receiver_o = PyStackRef_AsPyObjectBorrow(receiver);
PyObject *retval_o;
- assert(frame != &entry_frame);
+ assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
if ((tstate->interp->eval_frame == NULL) &&
(Py_TYPE(receiver_o) == &PyGen_Type || Py_TYPE(receiver_o) == &PyCoro_Type) &&
((PyGenObject *)receiver_o)->gi_frame_state < FRAME_EXECUTING)
@@ -8486,9 +8480,7 @@
// NOTE: It's important that YIELD_VALUE never raises an exception!
// The compiler treats any exception raised here as a failed close()
// or throw() call.
- #if TIER_ONE
- assert(frame != &entry_frame);
- #endif
+ assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
frame->instr_ptr++;
PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame);
assert(FRAME_SUSPENDED_YIELD_FROM == FRAME_SUSPENDED + 1);