Author ncoghlan
Recipients Mark.Shannon, ncoghlan
Date 2021-08-01.01:48:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627782511.03.0.274598412143.issue44800@roundup.psfhosted.org>
In-reply-to
Content
When merging the bpo-44590 changes into my PEP 558 implementation branch, I found it very hard to follow when the code was referring to the new interpreter frames rather than the existing Python frame objects that were historically used for both execution and introspection.

The "interpreter frame" name was also a little confusing, since the introspection frames are still associated with a specific interpreter, they're just not required for code execution anymore, only for code introspection APIs that call for a full Python object.

So, inspired by the "gi_xframe" (etc) attributes added in https://github.com/python/cpython/pull/27077, I'm proposing the following internal refactoring:

* Rename "pycore_frame.h" to "pycore_xframe.h"
* Rename the _interpreter_frame struct to _execution_frame
* Rename the type from InterpreterFrame to ExecFrame
* Use "xf_" rather than "f_" as the struct field prefix on execution frames
* Use "xframe" and "xf" rather than "frame" and "f" for execution frame variables
* Consistently use _PyExecFrame as the access function prefix, rather than a confusing mixture of _PyFrame and _PyInterpreterFrame
* Rename _PyThreadState_PushFrame to _PyThreadState_PushExecFrame
* Rename _PyThreadState_PopFrame to _PyThreadState_PopExecFrame
History
Date User Action Args
2021-08-01 01:48:31ncoghlansetrecipients: + ncoghlan, Mark.Shannon
2021-08-01 01:48:31ncoghlansetmessageid: <1627782511.03.0.274598412143.issue44800@roundup.psfhosted.org>
2021-08-01 01:48:30ncoghlanlinkissue44800 messages
2021-08-01 01:48:29ncoghlancreate