Improve performance of solving over apply expressions by directly applying the return type whenever possible. This has some nice side-effects:

- Addresses many common user-reported "expression too complex" bugs, including rdar://problem/18876786.
- Shaves up to 10% off of the total time to run our unit tests. (Unscientifically measured on my iMac: 427.46s before, 385.17s after.)

Swift SVN r24514
This commit is contained in:
Joe Pamer
2015-01-19 20:59:11 +00:00
parent 1e3f67e9c7
commit 87cbad9ec1
4 changed files with 105 additions and 11 deletions

View File

@@ -3335,9 +3335,6 @@ retry:
if (desugar2->getKind() == TypeKind::Function) {
auto func2 = cast<FunctionType>(desugar2);
assert(func1->getResult()->is<TypeVariableType>() &&
"the output of funct1 is a free variable by construction");
// If this application is part of an operator, then we allow an implicit
// lvalue to be compatible with inout arguments. This is used by
// assignment operators.