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

This commit is contained in:
Mark Shannon 2025-04-29 18:00:35 +01:00 committed by GitHub
parent caee16f052
commit ccf1b0b1c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 129 additions and 60 deletions

View file

@ -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;