Commit Graph

196 Commits

Author SHA1 Message Date
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Daniel Duan
2bc78b8c09 [stdlib] update for 'inout' adjustment (SE-0031) 2016-02-26 12:02:29 -08:00
Max Moiseev
bb3eaaf308 Merging in latest master 2016-02-24 15:10:25 -08:00
Jordan Rose
0205191e32 stdlib: SequenceType._initializeTo(_:) becomes _copyContents(initializing:) 2016-02-23 16:58:49 -08:00
Dave Abrahams
ece87787e0 stdlib: merge swift 3 UnsafePointer migrations 2016-02-23 15:45:45 -08:00
Dave Abrahams
d96b051d28 stdlib: initializePointee(_) => initialize(with:)
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:15:23 -08:00
Dmitri Gribenko
f0633ce5a9 stdlib: Sequence.iterator() => .makeIterator() 2016-02-23 13:52:30 -08:00
Max Moiseev
52f0cf49b0 [stdlib] indexOf => index(of:)/index(where:) 2016-02-23 11:45:11 -08:00
Max Moiseev
481bcabcba [stdlib] API naming guidelines applied to split and join
- `separator` label for first argument of `split`
- `join` and related types are renamed to `joined`
2016-02-22 15:43:33 -08:00
Max Moiseev
675f457c3d Introducing by argument label to Sequence.split 2016-02-22 12:00:27 -08:00
Max Moiseev
78ba5d5f3f [stdlib] Requires in comments changed to Precondition 2016-02-19 18:57:26 -08:00
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Dmitri Gribenko
593b4cc3d6 stdlib: add first argument label to _failEarlyRangeCheck2() 2016-02-18 17:11:35 -08:00
Janosch Hildebrand
916841d9db [stdlib] Fix precondition messages for MutableCollectionType slice replacing
The precondition messages in `_writeBackMutableSlice` were inverted in their respective meaning.
2016-02-18 15:02:28 +01:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Nate Cook
51251dc133 Convert imperative function summaries to present.
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74 Remove style on *generator* and friends. 2016-02-12 04:20:01 -06:00
Nate Cook
32f81e8238 Add missing abstracts for types and protocols. 2016-02-11 11:47:27 -06:00
Max Moiseev
39fdbca8d0 making Swift build succesfully after the merge 2016-02-04 16:48:14 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Slava Pestov
55644c1540 stdlib: Remove Self parameter from SequenceType._preprocessingPass
This code as written is not sound and should not type check
for non-final classes conforming to SequenceType (eg, NSArray).

Instead, capture the base of the call from the preprocess closure
passed in. The closure is @noescape, so it should be equivalent.
2016-01-29 12:18:39 -08:00
Trent Nadeau
160efd1023 Updated constraints and docs for popFirst/popLast. Added tests. 2016-01-23 18:01:06 +00:00
Adriano Ferreira
e6be43090e Adjust space in property/subscript declarations 2016-01-22 22:02:29 -05:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Adriano Ferreira
e6cbebe6ea Revert "Adjust space in property/subscript declarations"
This reverts commit 47ab2e0e28.
2016-01-22 19:53:01 -05:00
Adriano Ferreira
47ab2e0e28 Adjust space in property/subscript declarations 2016-01-22 17:03:15 -05:00
Dmitri Gribenko
574052f1be stdlib: standardize fatalError() messages for unavailable APIs 2016-01-21 16:34:54 -08:00
Dmitri Gribenko
62f73f4469 Rename CollectionDefaultIterator to IndexingIterator 2016-01-21 11:49:03 -08:00
Max Moiseev
b4d74838d6 improving the deprecation attribute message for MutableSliceable 2016-01-20 17:23:54 -08:00
Max Moiseev
86680ec622 [stdlib] @available attributes for removed APIs 2016-01-20 13:08:27 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
gregomni
e2dee6b9dd [stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Chris Lattner
a30ae2bf55 Merge pull request #836 from zachpanz88/new-year
Update copyright date
2015-12-31 19:36:14 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Kevin Ballard
6ae85cea26 [Stdlib] Optimize CollectionType.first
For lazy collections, `isEmpty` and `startIndex` may be O(N) operations.
The old implementation ended up being potentially O(2N) instead of O(1).
In particular, accessing `col.lazy.filter(pred).first` would evaluate
the predicate on elements twice, once to determine the result of
`isEmpty` and once to determine `startIndex`.
2015-12-31 13:30:11 -08:00
Dmitri Gribenko
b1fdf56f5c stdlib: mark _preprocessingPass with @noescape 2015-12-23 14:56:15 -08:00
Dmitri Gribenko
3877d04a73 Merge pull request #731 from ken0nek/add-spaces-before-and-after-arrow
Add spaces before and after closure arrow
2015-12-23 10:53:22 -08:00
Max Moiseev
200be71583 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-23 10:28:04 -08:00
ken0nek
e7e70cea92 Add spaces before and after closure arrow in stdlib 2015-12-23 04:52:15 +09:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Max Moiseev
bc942090ee cleaning up initializePointee/deinitializePointee, error messages and comments 2015-12-18 16:22:24 -08:00
Max Moiseev
5ccc258f71 func underestimatedLength() => var underestimatedLength { get } 2015-12-18 16:22:24 -08:00
Max Moiseev
b3fcc5fefa underestimateLength() => underestimatedLength() 2015-12-18 16:22:24 -08:00
Max Moiseev
ddd45f584d Revert "removing Collection.split(_ separator: ...) in favor of the one in Sequence"
This reverts commit 6431d39f7ef3db7f434005a4df5971318c42a817.
2015-12-18 16:20:01 -08:00
Max Moiseev
514047b6ec removing Collection.split(_ separator: ...) in favor of the one in Sequence 2015-12-18 16:20:01 -08:00
Max Moiseev
30c77a1833 Refactoring Sequence.split family of methods 2015-12-18 16:20:01 -08:00
Dmitri Gribenko
ebb3e45886 Sequence.{min,max}Element() => .min(), .max() 2015-12-17 17:07:01 -08:00
Maxim Moiseev
9e50505970 internal or public // @testable initializers 2015-12-17 17:02:49 -08:00