-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
TypeMap: Cease trying to guarantee sorting #32776
Conversation
d9df1ba
to
e866576
Compare
Would be good to get some before and after package loading times. |
handle accidental cycles in the TypeMap->next list, and handle forward refernces in TypeMap->prev without excessive printing
relax the check here to more closely match the comment
addresses an issue where we might be find an ambiguity with badly designed methods, such as the ambiguous Nothing/Missing rules (cf #31602)
We don't expect this to make much difference (as seen below), since it does roughly the same amount of work, and just does it more correctly. It does however gives us more tools to do so in the future, as well as prepares us to fix a threading race condition. on master:
on PR:
|
e866576
to
39c81e8
Compare
Ok, that's great. I didn't expect a significant change, but good to sanity check. |
We've found it can be hard to maintain specificity ordering linearly of method dispatch (c.f. #30171), this instead just embraces that and explicitly doesn't care and just adds an extra list to keep track of any inconsistencies. It turns out that seems to look a lot like our existing ambiguity analysis code! Plus, it'll hopefully mean we can make some easy speculative optimizations to the TypeMap which will hopefully make it faster to load code (#15048, #21760, #16418).
Closes #32747
Closes #29594