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
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
Cast before shifting
  • Loading branch information
markshannon committed Apr 15, 2025
commit aa4ddf08574e51ec1980230e56a5137ea5380aba
3 changes: 2 additions & 1 deletion Include/internal/pycore_stackref.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ static inline intptr_t
PyStackRef_UntagInt(_PyStackRef i)
{
assert((i.bits & Py_INT_TAG) == Py_INT_TAG);
return Py_ARITHMETIC_RIGHT_SHIFT(intptr_t, i.bits, 2);
intptr_t val = (intptr_t)i.bits;
return Py_ARITHMETIC_RIGHT_SHIFT(intptr_t, val, 2);
}


Expand Down
Loading
0