Solver: Keep track of a solution's score as we're computing it.

No functionality change here; just staging for some future optimizations.


Swift SVN r11028
This commit is contained in:
Doug Gregor
2013-12-09 17:12:07 +00:00
parent ac7ee4ba59
commit 79f8175e0b
8 changed files with 209 additions and 83 deletions

View File

@@ -526,6 +526,9 @@ tryUserConversion(ConstraintSystem &cs, Type type, ConstraintKind kind,
cs.addConstraint(kind, outputTV, otherType, resultLocator);
}
// We're adding a user-defined conversion.
cs.increaseScore(SK_UserConversion);
return ConstraintSystem::SolutionKind::Solved;
}