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

Closed
wants to merge 5 commits into 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.

@savannahostrowski
Copy link
Member Author

Closing this in favour of a different approach using the new machinery Ken Jin introduced for pure ops.

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy