Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
GH-119258: HandleSTORE_ATTR_WITH_HINT in tier two#119481
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
STORE_ATTR_WITH_HINT in tier twoSTORE_ATTR_WITH_HINT in tier twoThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm hoping to removeSTORE_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) |
markshannonMay 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| 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: |
Uh oh!
There was an error while loading.Please reload this page.
This way we can remove the version check in the optimizer, too!