GH-130415: Use `POP_TWO_LOAD_CONST_INLINE_BORROW` by savannahostrowski · Pull Request #134241 · python/cpython · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

GH-130415: Use POP_TWO_LOAD_CONST_INLINE_BORROW #134241

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented May 19, 2025

@Fidget-Spinner
Copy link
Member

Thanks for the PR. I'd like to advocate for this PR #132733 which will simplify this PR quite a bit. All you'd have to do after that PR lands is to add pure to the current bytecode definition. Then if you want you can improve the cases generator to automatically insert the pops.

@savannahostrowski
Copy link
Member Author

Ah, I didn't know that work was happening. I'll add some tests and then add the annotations when your PR lands.

@Fidget-Spinner
Copy link
Member

Thanks! The tests are definitely still gonna be very useful :).

@Fidget-Spinner
Copy link
Member

@savannahostrowski sorry for blocking this PR! The base PR has landed.

You just have to replace the body in the optimizer_bytecodes.c with REPLACE_OPCODE_IF_EVALUATES_PURE(left, right) now.

@brandtbucher
Copy link
Member

It’ll also involve modifying the cases generator to insert the new instruction when there is a single output and it’s immortal, too.

@Fidget-Spinner
Copy link
Member

We should also swap out _COMPARE_OP_INT to use the new style in this PR while we're at it I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.