Skip to content
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

LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT have internal branching. #122616

Closed
markshannon opened this issue Aug 2, 2024 · 2 comments
Closed
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@markshannon
Copy link
Member

markshannon commented Aug 2, 2024

https://github.com/python/cpython/blob/main/InternalDocs/adaptive.md describes how specialized instructions should be a series of guards followed by simple, linear code.
Both instructions have two different paths with guards on each path. We should eliminate one of the branches.
Since the instance dictionary is almost certain to have only str keys, we should choose that path.

Linked PRs

@markshannon markshannon changed the title STORE_ATTR_WITH_HINT has internal branching. LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT have internal branching. Aug 2, 2024
@hugovk
Copy link
Member

hugovk commented Aug 8, 2024

Triage: closing because the linked PR is merged, please re-open if still needed.

@scoder
Copy link
Contributor

scoder commented Oct 19, 2024

As already mentioned in the PR, this change introduced behavioural differences, making existing Python code fail with an exception. See cython/cython#6426 (comment)

@scoder scoder reopened this Oct 19, 2024
@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

4 participants