mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
GH-100987: Refactor _PyInterpreterFrame
a bit, to assist generator improvement. (GH-100988)
Refactor _PyInterpreterFrame a bit, to assist generator improvement.
This commit is contained in:
parent
160f2fe2b9
commit
d9199175c7
1 changed files with 2 additions and 4 deletions
|
@ -47,15 +47,13 @@ enum _frameowner {
|
|||
};
|
||||
|
||||
typedef struct _PyInterpreterFrame {
|
||||
/* "Specials" section */
|
||||
PyCodeObject *f_code; /* Strong reference */
|
||||
struct _PyInterpreterFrame *previous;
|
||||
PyObject *f_funcobj; /* Strong reference. Only valid if not on C stack */
|
||||
PyObject *f_globals; /* Borrowed reference. Only valid if not on C stack */
|
||||
PyObject *f_builtins; /* Borrowed reference. Only valid if not on C stack */
|
||||
PyObject *f_locals; /* Strong reference, may be NULL. Only valid if not on C stack */
|
||||
PyCodeObject *f_code; /* Strong reference */
|
||||
PyFrameObject *frame_obj; /* Strong reference, may be NULL. Only valid if not on C stack */
|
||||
/* Linkage section */
|
||||
struct _PyInterpreterFrame *previous;
|
||||
// NOTE: This is not necessarily the last instruction started in the given
|
||||
// frame. Rather, it is the code unit *prior to* the *next* instruction. For
|
||||
// example, it may be an inline CACHE entry, an instruction we just jumped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue