| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks. Could you also move the body of the if statement into the switch case.
Sorry, something went wrong.
| } | ||
| } | ||
| if (dictkind == MANAGED_VALUES || dictkind == OFFSET_DICT) { | ||
| if (dictkind == MANAGED_VALUES) { |
There was a problem hiding this comment.
Since there is only the one case now, it would make the code easier to follow if this were moved into the case MANAGED_VALUES: below.
Sorry, something went wrong.
|
Can I just get rid of the switch entirely? Each branch in the above if/else logic maps to exactly one case, so we might as well just lift the bodies of the cases up there. |
Sorry, something went wrong.
Sounds good to me. We can then get rid of ObjectDictKind as well. |
Sorry, something went wrong.
|
Looks good. |
Sorry, something went wrong.
|
Confirmed locally that this doesn't change the stats. |
Sorry, something went wrong.
* 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)
| Back | FazBrowse Home | New Git URL |
I think this was missed in #100753.
This removes a dict lookup, a dict version, and a cache write from one case where we fail to specialize method loads (due to the existence of a non-managed instance __dict__).