-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ConstraintSolver] Skip performance hacks in presence of unavailable … #11519
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
Conversation
@swift-ci please smoke test |
@swift-ci please test source compatibility |
I have a different idea now of how to solve this problem, i think we should be checking non-generic solution score for certain kinds of conversions (instead of simply if it has been increased or not) which should allow generic to be attempted e.g. if it has forced IUO conversion or a fix or any unavailable overloads, and we should attach best solution score to each |
737a924
to
143b6dd
Compare
@swift-ci please smoke test |
143b6dd
to
9345765
Compare
@swift-ci please smoke test |
9345765
to
5c02cc0
Compare
@swift-ci please smoke test |
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 but there is a typo you should fix up at some point.
lib/Sema/CSSolver.cpp
Outdated
bool hasUnavailableOverloads = score.Data[SK_Unavailable] > 0; | ||
|
||
// Attempt to short-circuit disjunction only if | ||
// score indicates that there are no unavaible |
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.
typo: unavaible
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.
Thanks! And of course I had to make a typo :)
…overloads Limit the scope of the performance hacks which currently exist in the solver even further by disallowing it to skip generic overlaods or stop in case when previous solutions involve unavailable overloads, which otherwise might lead to producing incorrect overall solutions.
5c02cc0
to
47353c2
Compare
@swift-ci please smoke test |
source compatibility suite currently has |
@swift-ci please test source compatibility |
Ok, looks like it's still only |
…overloads
Limit the scope of the performance hacks which currently exist in the
solver even further by not allowing it to skip generic overlaods or stop
solver in case when previous solutions involve unavailable overloads,
which otherwise might lead to producing incorrect overall solutions.