Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Mar 14, 2018

Attempt to simplify the solver by removing (and replacing) most of the hacks.

@xedin
Copy link
Contributor Author

xedin commented Mar 14, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Mar 20, 2018

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Mar 22, 2018

#15311
@swift-ci please smoke test macOS platform

xedin added 11 commits March 21, 2018 22:30
…atch

If overload set contains both protocol requirement and its witnesses
let's only leave requirement itself active until we know that it matches,
in such case we'd re-enable witness methods and attempt them. This
helps to significantly reduce the number of overload choices we consider
upfront e.g. for '==' operator we can hide 53 choices behind Equatable
protocol from total number of 68 choices.
Constraint system "shrinking" only gets in the way now since
it can't properly reduce domains with generic solutions.
In expressions like `x + y + foo()` try to optimize constraint system
by favoring choice at the same position for immediately reachable
operator. This "softly" exploits the fact that most of the expressions
with linked arithmetic/conditional operators are homogeneous.
…iterals

To speed up type-checking for numeric literal types let's try to
implicitly convert expressions like `UInt32(42)` into `42 as UInt32`
but only if requested type conforms to the correct literal protocol.

The desired outcome is that we can properly type-check expressions
like `UInt64(0xffff_ffff_ffff_ffff)` and speed up solving of more
complex expressions by avoiding checking all of the initializer
overloads since most of them are likely unrelated.
@xedin
Copy link
Contributor Author

xedin commented Mar 22, 2018

@swift-ci please smoke test macOS platform

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.

1 participant