bpo-42927: Inline cache for slots #24216
Conversation
|
Something is wrong, we are reaching ther |
|
Okay, assuming the tests pass, this is the version I'm sending for review. |
|
It seems test_ssl on macOS failed, but the other test failures have been resolved. Is that test flaky? |
Given the nature of this change and the fact that the error says:
I would say is unrelated. I have restarted manually the tests. |
|
If you want to schedule another build, you need to add the " |
|
LGTM! Let's do a buildbot pass to make sure there are no reference leaks. |
|
Seems we are missing something because some of the buildbots are crashing with segmentation faults. For instance: https://buildbot.python.org/all/#/builders/459/builds/69
The failures seem to be in test_inspect and test_zipfile |
|
Hm. I think this may happen when |
This is a modification of the
LOAD_ATTRinline cache that landed a few months ago (PR 22803).The design overloads the
hintfield: if it is negative, it indicates a slot. Slots are created using__slots__, but some builtin types that usePyMemberDescrObjectdescriptors (with the type set toT_OBJECT_EX) will also benefit.I've tried to keep the code style similar to the existing
LOAD_ATTRcache (happy path first) but I had to make some compromises, e.g. the cache initialization code can no longer skip everything iftp_dictoffsetis zero (since it will be zero for classes with only slots).https://bugs.python.org/issue42927