8000 GH-132508: Use tagged integers on the evaluation stack for the last instruction offset by markshannon · Pull Request #132545 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-132508: Use tagged integers on the evaluation stack for the last instruction offset #132545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove debug code
  • Loading branch information
markshannon committed Apr 16, 2025
commit b4915443c7dcd1d208bd32f082a4429ec5009e03
1 change: 1 addition & 0 deletions Include/internal/pycore_interpframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern "C" {
((int)((IF)->instr_ptr - _PyFrame_GetBytecode((IF))))

static inline PyCodeObject *_PyFrame_GetCode(_PyInterpreterFrame *f) {
assert(!PyStackRef_IsNull(f->f_executable));
PyObject *executable = PyStackRef_AsPyObjectBorrow(f->f_executable);
assert(PyCode_Check(executable));
return (PyCodeObject *)executable;
Expand Down
5 changes: 0 additions & 5 deletions Include/internal/pycore_stackref.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,6 @@ PyStackRef_AsPyObjectBorrow(_PyStackRef ref)
return BITS_TO_PTR_MASKED(ref);
}

#ifdef Py_DEBUG
#define PyStackRef_AsPyObjectBorrow(REF) \
(assert(!PyStackRef_IsTaggedInt(REF)), PyStackRef_AsPyObjectBorrow(REF))
#endif

static inline _PyStackRef
PyStackRef_Borrow(_PyStackRef ref)
{
Expand Down
Loading
0