Commit Graph

13 Commits

Author SHA1 Message Date
Joe Groff
32b50c624d stdlib: Remove _isBridgedToObjectiveC from _ObjectiveCBridgeable.
All generic bridgeable types can bridge for all their instantiations now. Removing this ferrets out some now-unnecessary traps that check for unbridgeable parameter types.
2016-07-25 06:01:21 -07:00
Doug Gregor
ab3a15c87a [SE-0091 / Foundation overlay] Move operators into types.
Foundation provides a number of specific operators defined in the
global scope. Push all of these into their corresponding types. This
cleanup helps verify that the SE-0091 implementation is generally
functional.
2016-07-18 23:18:57 -07:00
Mark Lacey
599ab76fb8 Remove ordered compare of optional and non-optional.
Safely unwrap two optionals used in the compare that follows.

NFC, but this (or another work-around) will be required if either
SE-0121 or SE-0123 is approved.
2016-07-17 17:45:36 -07:00
Tony Parker
510e5e17a0 Merge pull request #3486 from xwu/SR-1818
Fix IndexSet intersection and symmetric difference [SR-1818]
2016-07-13 15:34:29 -06:00
Nate Cook
56040ef828 Merge pull request #3494 from natecook1000/nc-indexset-contains
Fix IndexSet.contains(integersIn:) documentation
2016-07-13 12:24:19 -05:00
Nate Cook
f54ad5a1f5 Fix IndexSet.contains(integersIn:) documentation 2016-07-13 11:05:31 -05:00
Xiaodi Wu
c0c704641a Remove unnecessary condition in IndexSetBoundaryIterator 2016-07-12 23:22:23 -05:00
Xiaodi Wu
39d7dd27a1 Fix IndexSet intersection and symmetricDifference [SR-1818] 2016-07-12 23:03:37 -05:00
Doug Gregor
823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
Tony Parker
f9c1dd4386 Adopt the new indexing model for better perf in IndexSet
Concurrently with the development of struct IndexSet, the stdlib team
was busy reworking the way that all indexes in collections worked
(https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices.md).
Both efforts landed at basically the same time. We did the minimum
possible to adopt the new indexing model when IndexSet landed. This
change more correctly adopts the new model.

In summary, the new model has the Collection change the value of the
Index, instead of the Index changing the value on its own. Previously,
the Index had methods like successor(), but now the Collection has
methods like index(after:). This means that the index no longer has to
store a reference to the collection in many cases, which means that CoW
semantics can kick in far more often as the index is a dead simple model
object that just stores a bunch of integers. So basically, this change
moves all the logic for moving indexes from Index into IndexSet.

<rdar://problem/26269319> More fully adopt new indexing model for better performance in IndexSet
2016-07-08 14:15:49 -07:00
Tony Parker
c2c1b8468a Add overloads for range types to IndexSet
The Swift 3 refactoring of the range type has led to its split into 4
different types. The IndexSet API should accept any of these as long as
they contain the element type (Int, which is inherently Countable). This
allows callers to use both the ... and ..< syntax, for example.

This commit also adds additional unit tests for some of the IndexSet
API, and turns a few methods with optional/default args into properties
or a method family, since otherwise callers would end up with an
ambigious method call as the range argument would have been defaulted to
nil.

<rdar://problem/26532614> Add overloads for range types to IndexSet
2016-07-08 10:17:03 -07:00
practicalswift
64b3c6c880 [gardening] Remove invisible ^H 2016-06-15 22:54:11 +02:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00