Commit Graph

7762 Commits

Author SHA1 Message Date
Dave Abrahams
c793aebbe3 [stdlib] indexing model: String slicing diagnostics
The new range types need to be treated specially in order to get the
same old diagnostics.
2016-03-18 15:10:58 -07:00
Dave Abrahams
a9dd95c37a [stdlib] indexing model: Generic Mutable Slicing 2016-03-18 15:08:40 -07:00
Dave Abrahams
388833831b Balance parens in gyb file
It was messing with our editor's indentation to have unmatched parens in
gyb'd segments.
2016-03-18 15:05:12 -07:00
Dave Abrahams
e65787f1fa [stdlib] indexing model: Generic removeSubrange 2016-03-18 14:07:13 -07:00
Dave Abrahams
3d7921a62c [stdlib] indexing model: Public subscripts
The intended subscripting overloads for CollectionType were internal, so
not having the right effect.

Failures down to 20, 5 in stdlib.
2016-03-18 13:48:15 -07:00
Dave Abrahams
88a9f2e628 [stdlib] indexing model: Complete Interval/Range merge
Down to 22 failures; only 5 in stdlib tests
2016-03-18 10:04:09 -07:00
Dave Abrahams
c5031aacf2 [stdlib] indexing model: Overload bug workarounds
rdar://25214598
2016-03-17 14:45:15 -07:00
Dave Abrahams
d6c0c8a594 [stdlib] indexing model: Slicing overloads
Support slicing with all the kinds of Ranges
2016-03-17 14:45:11 -07:00
Nate Cook
afac511c19 [stdlib] Remove unavailable annotation for MutableCollection.sort() 2016-03-17 16:12:37 -05:00
Max Moiseev
03cbb49982 [stdlib] _stdlibAssert => _debugPrecondition 2016-03-17 12:16:19 -07:00
Dave Abrahams
48d33f19b6 [stdlib] indexing model: Internal Naming
"Pos" is no longer a good name for that generic parameter.
2016-03-17 02:59:02 -07:00
Dave Abrahams
d1241c4931 [stdlib] indexing model: prep ClosedRange separation 2016-03-17 02:54:13 -07:00
Dave Abrahams
688f917abd [stdlib] indexing model WIP: Establish ClosedRange 2016-03-16 17:27:52 -07:00
Dave Abrahams
68d68114ca [stdlib] indexing model: Drop redundant Range !=
The default is already being generated for us.
2016-03-16 17:13:36 -07:00
Dave Abrahams
3fbf6911dc [stdlib] indexing model: Factor Range some more 2016-03-16 17:04:15 -07:00
Dave Abrahams
2d7e068401 [stdlib] indexing model: a missed next(_) for HashedCollections 2016-03-16 16:46:11 -07:00
Dave Abrahams
f49ea36820 [stdlib] indexing model: Factor Range 2016-03-16 16:46:00 -07:00
Dave Abrahams
17f841430c Merge Range work 2016-03-16 15:59:39 -07:00
Dave Abrahams
ed3c537638 [stdlib] indexing model: Check Range invariants 2016-03-16 15:59:11 -07:00
Dave Abrahams
f493b54e44 [stdlib] indexing model: Interval/Range merge
This is step 1; we still need to introduce ClosedRange.
2016-03-16 15:59:10 -07:00
Dave Abrahams
8c5cf9b4fc [stdlib] indexing model: next(_) for HashedCollections 2016-03-16 15:59:05 -07:00
Patrick Pijnappel
771a81594f [stdlib] Fix indentation in Unicode.swift 2016-03-17 06:41:59 +11:00
Patrick Pijnappel
7e0945e7ac [stdlib] Use explicit internal in Unicode.swift 2016-03-17 06:23:19 +11:00
Patrick Pijnappel
0a2804d3ba [stdlib] Fix a/an in comment 2016-03-17 06:15:29 +11:00
Patrick Pijnappel
77b4d73560 [stdlib] Replace stray usages of generator by iterator 2016-03-17 06:07:20 +11:00
Patrick Pijnappel
4d3d7234aa [stdlib] Replace usages of generator with iterator 2016-03-17 05:50:05 +11:00
Patrick Pijnappel
57bddb7749 [stdlib] Change post-nil guarantee for missed case of IteratorType.next() 2016-03-16 22:37:47 +11:00
Patrick Pijnappel
07a8c39fcb [stdlib] Use double space as sentence separator in IteratorType.next() docs. 2016-03-16 22:36:26 +11:00
Patrick Pijnappel
020841d4ba [stdlib] Add post-nil guarantee for IteratorProtocol.next() to always return nil 2016-03-16 22:06:07 +11:00
Dmitri Gribenko
e2bd463f3c New indexing model: add ambiguity breakers for removeLast() 2016-03-15 20:55:20 -07:00
Dmitri Gribenko
3fee303f36 New indexing model: add an extra constraint on Collection.SubSequence that we can't express now 2016-03-15 20:55:20 -07:00
Xi Ge
a9727dbace ModuleGroup: Add several subgroups. 2016-03-15 17:00:00 -07:00
Doug Gregor
1d90b044fb Really reinstate "[SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit 052d2d0a69.

The only actual issue with the original change was a missing change to
the UIApplicationMain SILGen test, which needs to build SILGen
overlays to execute properly; -enable-source-import doesn't suffice.
2016-03-15 15:44:07 -07:00
Doug Gregor
052d2d0a69 Revert "Reinstate [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit b25019c259. The
builders are failing in ways that are clearly related to my changes
but I'm unable to replicate locally.
2016-03-15 15:00:31 -07:00
Dave Abrahams
2202ac93c4 [stdlib] indexing model: merge upstream 2016-03-15 13:03:27 -07:00
Dave Abrahams
b946fb5512 [stdlib] indexing model: ExistentialCollection WIP
Make AnyXXXCollection conform to the right collection protocols
2016-03-15 12:58:37 -07:00
Dave Abrahams
6cbd1f9c3a [stdlib] indexing model: drop ReverseRandomAccessIndex
Now that the strideable constraint is dropped, we don't need this anymore.
2016-03-15 12:57:54 -07:00
Dave Abrahams
7419330d99 [stdlib] indexing model: drop redundant operators
These were already provided by default; no need to code them.
2016-03-15 12:57:00 -07:00
Dave Abrahams
a5b0b9d764 [stdlib] indexing model: lift Strideable constraint
Making constraining the indices of RandomAccessCollections to be
Strideable has dubious semantic implications and makes implementing
AnyRandomAccessCollection really hard.
2016-03-15 12:54:41 -07:00
Dmitri Gribenko
0dd8b4b22e stdlib: improve FIXME text 2016-03-15 12:50:30 -07:00
Doug Gregor
b25019c259 Reinstate [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable.
This reverts commit 01fe7e4848.
2016-03-15 11:38:06 -07:00
Doug Gregor
01fe7e4848 Revert "[SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit aa9cc23743.
2016-03-15 06:52:27 -07:00
Dmitri Gribenko
85d955b788 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-15 01:27:03 -07:00
Dmitri Gribenko
4f2f639fe0 New indexing model: fix test/1_stdlib/Mirror.swift 2016-03-14 22:12:02 -07:00
Dmitri Gribenko
157d3c84bd New indexing model: implement ReverseRandomAccessCollection.advance() and .distance() 2016-03-14 20:04:11 -07:00
Dmitri Gribenko
95163c4813 stdlib: New indexing model: fix a new inout violation in Collection.partition() 2016-03-14 18:59:27 -07:00
Dmitri Gribenko
544411c270 stdlib: fix coding style 2016-03-14 18:59:27 -07:00
Dave Abrahams
e85c7a9664 [stdlib] indexing model: ExistentialCollection WIP
Implemented the ForwardCollection parts; 17 of 51 tests now pass.
2016-03-14 18:50:09 -07:00
Dave Abrahams
c5e46635ea [stdlib] indexing model: WIP
1_stdlib/Collection.swift test runs without error.

Note: advance and distance implementations for which the default works
were removed from StringCharacterView.swift
2016-03-14 17:27:32 -07:00
Doug Gregor
aa9cc23743 [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable.
Introduce a new entrypoint to _ObjectiveCBridgeable,
_unconditionallyBridgeFromObjectiveC, which handles unconditional
bridging from an optional Objective-C object (e.g., an NSString) to
its bridged Swift type. Use it in SILGen to perform NSString -> String
bridging rather than the custom entry point.

Another small step toward generalized bridging.
2016-03-14 11:17:46 -07:00