Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
brandtbucher merged 4 commits intopython:mainfrombrandtbucher:store-attr-with-hint
May 28, 2024

Conversation

@brandtbucher
Copy link
Member

@brandtbucherbrandtbucher commentedMay 23, 2024
edited by bedevere-appbot
Loading

This way we can remove the version check in the optimizer, too!

@brandtbucherbrandtbucher added performancePerformance or resource usage skip news interpreter-core(Objects, Python, Grammar, and Parser dirs) labelsMay 23, 2024
@brandtbucherbrandtbucher self-assigned thisMay 23, 2024
@brandtbucherbrandtbucher changed the titleHandleSTORE_ATTR_WITH_HINT in tier twoGH-119258: HandleSTORE_ATTR_WITH_HINT in tier twoMay 23, 2024
Copy link
Member

@markshannonmarkshannon left a 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)
Copy link
Member

@markshannonmarkshannonMay 24, 2024
edited
Loading

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.

brandtbucher reacted with thumbs up emoji

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

brandtbucher reacted with thumbs up emoji
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
assert(tp->tp_flags&Py_TPFLAGS_MANAGED_DICT);
assert(Py_TYPE(owner)->tp_flags&Py_TPFLAGS_MANAGED_DICT);

brandtbucher reacted with thumbs up emoji
@bedevere-app
Copy link

When you're done making the requested changes, leave the comment:I have made the requested changes; please review again.

@brandtbucherbrandtbucher merged commit5cd3ffd intopython:mainMay 28, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull requestJul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@Fidget-SpinnerFidget-SpinnerFidget-Spinner approved these changes

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

@brandtbucherbrandtbucher

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usageskip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@brandtbucher@markshannon@Fidget-Spinner

[8]ページ先頭

©2009-2025 Movatter.jp