Commit Graph

509 Commits

Author SHA1 Message Date
Doug Gregor
376089190d [Constraint application] Thread locators through coercions.
No functionality change, yet.


Swift SVN r5097
2013-05-08 18:39:20 +00:00
Doug Gregor
22859a119b [Constraint checker] A solution should know about the constraint system it solves.
No functionality change here. As a drive-by, fix the locator for
user-defined conversions.


Swift SVN r5091
2013-05-08 17:56:31 +00:00
Doug Gregor
e114abe21c [Constraint application] Coerce tuples to tuples.
Start factoring out the logic that computes the mapping from one tuple
type to another. We're only using it in one place now (the
tuple-to-tuple coercion), but it should be picked up by the constraint
checker's type-matching code.

Also, fix the temporary statistics covering how much is going through
the old coercion code. With this change, we're only missing 40 of 4548
of the coercions in swift.swift (all of which appear to be string
interpolations, function type conversions, or user-defined
conversions).


Swift SVN r5087
2013-05-08 04:03:53 +00:00
Doug Gregor
7b03a4dfed Move the constraint checker's type-coercion logic into Solution.
No functionality change (yet).


Swift SVN r5067
2013-05-06 22:52:01 +00:00
Joe Groff
635b84a228 Sema: Get metatypes for type member constraints inside addTypeMemberConstraint.
This eliminates some boilerplate from the call sites where addTypeMemberConstraint is used correctly, fixes bugs where it isn't (viz. in openType, where we were matching secondary archetypes to the metatype types of the associated types rather than to the associated types themselves), and should prevent the same class of bug from being introduced by new type member constraint generators.

Swift SVN r5041
2013-05-05 17:29:22 +00:00
Doug Gregor
2c85604e14 Remove the T(x)-as-coercion syntax from the type checker.
Swift SVN r5008
2013-05-01 04:17:21 +00:00
Doug Gregor
9b4757b288 Minor formatting cleanups.
Swift SVN r4640
2013-04-09 21:43:36 +00:00
Joe Groff
4923acce2b Use C++11 alignof(T) instead of llvm::AlignOf<T>.
Swift SVN r4583
2013-04-03 02:41:29 +00:00
Doug Gregor
be66b4546f Split the constraint-based type checker into five parts.
The five parts are:
  - Support code and high-level entry points
  - Constraint generation
  - Constraint solving
  - Constraint application
  - Diagnostics

No functionality change.


Swift SVN r4447
2013-03-19 16:04:31 +00:00