Skip to content

[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

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 19, 2017

…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.

@xedin
Copy link
Contributor Author

xedin commented Aug 19, 2017

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Aug 19, 2017

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Aug 20, 2017

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 lastSolvedChoice instead to make it more general.

@xedin xedin force-pushed the unavailable-limits-perf-hacks branch from 737a924 to 143b6dd Compare August 20, 2017 08:32
@xedin xedin requested a review from rudkx August 20, 2017 08:34
@xedin
Copy link
Contributor Author

xedin commented Aug 20, 2017

@swift-ci please smoke test

@xedin xedin force-pushed the unavailable-limits-perf-hacks branch from 143b6dd to 9345765 Compare August 20, 2017 09:35
@xedin
Copy link
Contributor Author

xedin commented Aug 20, 2017

@swift-ci please smoke test

@xedin xedin force-pushed the unavailable-limits-perf-hacks branch from 9345765 to 5c02cc0 Compare August 21, 2017 20:43
@xedin
Copy link
Contributor Author

xedin commented Aug 21, 2017

@swift-ci please smoke test

Copy link
Contributor

@rudkx rudkx left a 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.

bool hasUnavailableOverloads = score.Data[SK_Unavailable] > 0;

// Attempt to short-circuit disjunction only if
// score indicates that there are no unavaible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: unavaible

Copy link
Contributor Author

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.
@xedin xedin force-pushed the unavailable-limits-perf-hacks branch from 5c02cc0 to 47353c2 Compare August 21, 2017 21:55
@xedin
Copy link
Contributor Author

xedin commented Aug 21, 2017

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Aug 22, 2017

source compatibility suite currently has mapper failing, going to run it for this branch as well so make sure I didn't break anything else...

@xedin
Copy link
Contributor Author

xedin commented Aug 22, 2017

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Aug 22, 2017

Ok, looks like it's still only mapper which fails and it's unrelated (API has been changed, the error was error: 'characters' is deprecated: Please use String or Substring directly).

@xedin xedin merged commit b14c803 into swiftlang:master Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants