Commit Graph

56 Commits

Author SHA1 Message Date
Joe Pamer
1914df72f3 Begin making locators non-optional for constraints.
One difficulty in generating reasonable diagnostic data for type check failures has been the fact that many constraints had been synthesized without regard for where they were rooted in the program source. The result of this was that even though we would store failure information for specific constraints, we wouldn't emit it for lack of a source location. By making location data a non-optional component of constraints, we can begin diagnosing type check errors closer to their point of failure.

Swift SVN r18751
2014-06-09 17:49:46 +00:00
Dave Abrahams
13962588a9 [stdlib] add reverse(c), s/Reverse/ReverseView/g
Now reverse() is available as a peer to map() and filter()
Addresses <rdar://problem/15919204>

Swift SVN r18389
2014-05-19 04:30:16 +00:00
Dave Abrahams
e0d37be053 [stdlib] Rename (Indexed=>Permutation)Generator
It was too easily confused with IndexingGenerator, which, come to think
of it may be obsolete.  It's just a PermutationGenerator with
startIndex..endIndex in the indices sequence.

Swift SVN r18341
2014-05-18 19:03:26 +00:00
Ted Kremenek
9eea282719 Switch range operators ".." and "...".
- 1..3 now means 1,2
- 1...3 now means 1,2,3

Implements <rdar://problem/16839891>

Swift SVN r18066
2014-05-14 07:36:00 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Doug Gregor
b6af1cc01d Implement support for calling operators declared in protocols when
using archetypes so that, e.g., an archetype T that conforms to
Ordered can be compared with <. Requires the introduction of
'archetype' constraints, so that we don't run amok and allow the use
of operators in protocols for *any* type that meets the requirements
of the protocol. This may change later, with default implementations,
of course.

The egregious hack introduced in Char.isSpace() works around known,
massive performance problems with the solver's exploration of the
state space. In this case, we have 6 instances of ==, each of which
has 18 overloads, for a large state space. However, we compound the
problem significantly by trying many possibilities for the ~30 type
variables in each state, rather than concluding quickly (as we should)
that most of those branches don't make sense.



Swift SVN r2922
2012-10-02 18:27:21 +00:00