-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-101409: Improve generated clinic code for self type checks #101411
gh-101409: Improve generated clinic code for self type checks #101411
Conversation
Store the self type pointer in a local variable.
cc. @colorfulappl |
IMHO, this improvement is worth it.
|
That is true; we cannot guarantee that the compiler will eliminate the redundant calls.
I agree with this. Thanks for the review, @colorfulappl; highly appreciated. |
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.
self_tp
may be not a good name. It is not a type of self
. Maybe base_type
or declared_type
or something?
|
|
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.
LGTM
Thanks for the reviews, y'all! |
* main: pythonGH-100288: Skip extra work when failing to specialize LOAD_ATTR (pythonGH-101354) pythongh-101409: Improve generated clinic code for self type checks (python#101411) pythongh-98831: rewrite BEFORE_ASYNC_WITH and END_ASYNC_FOR in the instruction definition DSL (python#101458) pythongh-101469: Optimise get_io_state() by using _PyModule_GetState() (pythonGH-101470)
Store the self type pointer in a local variable.