GH-119258: Handle STORE_ATTR_WITH_HINT in tier two#119481
Merged
brandtbucher merged 4 commits intopython:mainfrom May 28, 2024
Merged
GH-119258: Handle STORE_ATTR_WITH_HINT in tier two#119481brandtbucher merged 4 commits intopython:mainfrom
STORE_ATTR_WITH_HINT in tier two#119481brandtbucher merged 4 commits intopython:mainfrom
Conversation
STORE_ATTR_WITH_HINT in tier twoSTORE_ATTR_WITH_HINT in tier two
markshannon
requested changes
May 24, 2024
Member
markshannon
left a comment
There was a problem hiding this comment.
I'm hoping to remove STORE_ATTR_WITH_HINT once almost all instance have inline values.
Until then, this seems like a worthwhile improvement.
One question and a couple of suggestions.
| #endif | ||
|
|
||
| void | ||
| PyAPI_FUNC(void) |
Member
There was a problem hiding this comment.
Why does this symbol need to be exposed?
It isn't used by the JIT.
It is used, via the _PyDict_NotifyEvent inline function.
Python/bytecodes.c
Outdated
|
|
||
| inst(STORE_ATTR_WITH_HINT, (unused/1, type_version/2, hint/1, value, owner --)) { | ||
| op(_STORE_ATTR_WITH_HINT, (hint/1, value, owner --)) { | ||
| PyTypeObject *tp = Py_TYPE(owner); |
Member
There was a problem hiding this comment.
Suggested change
| PyTypeObject *tp = Py_TYPE(owner); |
This is only used in the assert, AFAICT, so will generate a compiler warning for non-debug builds.
Python/bytecodes.c
Outdated
| PyTypeObject *tp = Py_TYPE(owner); | ||
| assert(type_version != 0); | ||
| DEOPT_IF(tp->tp_version_tag != type_version); | ||
| assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT); |
Member
There was a problem hiding this comment.
Suggested change
| assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT); | |
| assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT); |
|
When you're done making the requested changes, leave the comment: |
Fidget-Spinner
approved these changes
May 25, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this pull request
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This way we can remove the version check in the optimizer, too!