mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
GH-96421: Insert shim frame on entry to interpreter (GH-96319)
* Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault() * Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.
This commit is contained in:
parent
dbf2faf579
commit
1e197e63e2
24 changed files with 450 additions and 346 deletions
|
@ -1329,15 +1329,15 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int _PyFrame_IsEntryFrame(PyFrameObject *frame)
|
||||
int
|
||||
_PyFrame_IsEntryFrame(PyFrameObject *frame)
|
||||
{
|
||||
assert(frame != NULL);
|
||||
assert(!_PyFrame_IsIncomplete(frame->f_frame));
|
||||
return frame->f_frame->is_entry;
|
||||
_PyInterpreterFrame *f = frame->f_frame;
|
||||
assert(!_PyFrame_IsIncomplete(f));
|
||||
return f->previous && f->previous->owner == FRAME_OWNED_BY_CSTACK;
|
||||
}
|
||||
|
||||
|
||||
PyCodeObject *
|
||||
PyFrame_GetCode(PyFrameObject *frame)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue