aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-01-21 10:15:02 +0000
committerGitHub <noreply@github.com>2025-01-21 10:15:02 +0000
commitf5b6356a11bde64ac1e08478dd5ee7c47da653d8 (patch)
treef9367b879f47e48c03b0dbe66a9d573302f87764 /Python/executor_cases.c.h
parentd3b1bb228c951f8245f36ee28d9b175786522730 (diff)
downloadcpython-f5b6356a11bde64ac1e08478dd5ee7c47da653d8.tar.gz
cpython-f5b6356a11bde64ac1e08478dd5ee7c47da653d8.zip
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/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 049073162b6..0d6719a5c40 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1441,9 +1441,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());
@@ -1579,9 +1577,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);