GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)

Add new frame owner type for interpreter entry frames
This commit is contained in:
Mark Shannon 2025-01-21 10:15:02 +00:00 committed by GitHub
parent d3b1bb228c
commit f5b6356a11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 33 additions and 48 deletions

View file

@ -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);