diff options
author | Mark Shannon <mark@hotpy.org> | 2023-02-13 11:31:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 11:31:15 (GMT) |
commit | d9199175c7386a95aaac91822a2197b9365eb0e8 (patch) | |
tree | 303039a5cd55df046113a8d38a00688729443cbb | |
parent | 160f2fe2b90ed5ec7838cb4141dd35768422891f (diff) | |
download | cpython-d9199175c7386a95aaac91822a2197b9365eb0e8.zip cpython-d9199175c7386a95aaac91822a2197b9365eb0e8.tar.gz cpython-d9199175c7386a95aaac91822a2197b9365eb0e8.tar.bz2 |
GH-100987: Refactor `_PyInterpreterFrame` a bit, to assist generator improvement. (GH-100988)
Refactor _PyInterpreterFrame a bit, to assist generator improvement.
-rw-r--r-- | Include/internal/pycore_frame.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h index f12b225..81d16b2 100644 --- a/Include/internal/pycore_frame.h +++ b/Include/internal/pycore_frame.h @@ -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 |