Max Moiseev
7fe6916bf6
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-03-07 12:10:47 -08:00
Hugh Bellamy
c1b25bb32f
[gardening] Remove double new lines from stdlib files
2016-03-05 15:44:54 +00: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
ffeec94ea4
stdlib: fix coding style
2016-02-23 14:00:46 -08:00
Dmitri Gribenko
f0633ce5a9
stdlib: Sequence.iterator() => .makeIterator()
2016-02-23 13:52:30 -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
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
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
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Doug Gregor
7d70b704e4
Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines
2016-01-19 23:18:20 -08:00
Dmitri Gribenko
74ce1ca79c
Add unavailable declarations for Swift 2.2 -> 3 migration
2016-01-19 14:32:59 -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
Doug Gregor
1a38e0ad3b
Merge branch 'master' into swift-3-api-guidelines
2016-01-06 15:32:55 -08:00
Max Moiseev
31f17e212c
[stdlib] using static method dispatch instead of failable casts
...
Overriding `AnySequence.dropFirst` and `AnySequence.prefix` to delegate
these operations to an underlying sequence, thus simplifying default
implementations in `Sequence`.
2016-01-06 13:22:24 -08:00
Max Moiseev
1600c52822
[stdlib] Constraining AnySequence.init
...
... to only allow sequences where SubSequence.SubSequence ==
SubSequence. See swift-evolution proposal
https://github.com/apple/swift-evolution/blob/master/proposals/0014-constrained-AnySequence.md
for more details.
2016-01-06 12:25:09 -08:00
Max Moiseev
f51e708a8f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
Dmitri Gribenko
b1fdf56f5c
stdlib: mark _preprocessingPass with @noescape
2015-12-23 14:56:15 -08:00
ken0nek
e7e70cea92
Add spaces before and after closure arrow in stdlib
2015-12-23 04:52:15 +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
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
Dmitri Gribenko
73ce9ae7e9
Collection.count => .length
...
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Max Moiseev
3fe0c60d7f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-17 11:00:02 -08:00
Maxim Moiseev
e6468a0eca
_precondition => _require
2015-12-16 17:19:01 -08:00
Maxim Moiseev
f2f50d6a9d
precondition => require
2015-12-16 17:16:08 -08:00
Maxim Moiseev
6c50752aed
UnsafePointer: initializeMemory and deinitializePointee
2015-12-16 17:11:57 -08:00
Dmitri Gribenko
4025882438
Improve comments
2015-12-16 14:50:35 -08:00
Chris Lattner
e9a2e1e128
Eliminate all of the uses of ++/-- from stdlib/public/core.
...
At DaveA's suggestion, I took a mostly mechanical approach to this:
pointers and numeric types start using += 1, and indexes use
i = i.successor(). The index model is likely to be revised in
Swift 3 anyway, so micro-optimizing this code syntactically isn't
super important.
There is some performance concern of this patch, since some
in-place succesor operations are more efficient than
i = i.successor(). The one that seems particularly at issue is the
instance in the implementation of partition(), which I changed to
use i._successorInPlace(). If other instances lead to a perf issue,
they can be changed to use that as well.
2015-12-15 23:21:55 -08:00
Max Moiseev
2021dd5a4d
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-15 12:49:22 -08:00
Dmitri Gribenko
f25bf9eaf7
Merge pull request #544 from nielsandriesse/patch-11
...
Update _DropFirstSequence.next() for removal of ++ operator
2015-12-15 09:42:09 -08:00
Niels Andriesse
967ac96bb1
Update _PrefixSequence.next() for removal of ++ operator
2015-12-15 11:16:42 +11:00
Niels Andriesse
0e71b9277d
Update _DropFirstSequence.next() for removal of ++ operator
2015-12-15 11:04:41 +11:00
Maxim Moiseev
844b81c46b
SequenceType => Sequence
2015-12-09 17:16:56 -08:00
Maxim Moiseev
7e2466c14e
CollectionType => Collection
2015-12-09 17:12:48 -08:00
Dmitri Gribenko
1c0047829a
Rename SequenceType.generate() to SequenceType.iterator()
2015-12-09 17:11:17 -08:00
Dmitri Gribenko
2cf172160c
Rename SequenceType.Generator associated type to SequenceType.Iterator
2015-12-09 17:11:05 -08:00
Dmitri Gribenko
31598d41bf
Rename GeneratorType to IteratorProtocol
2015-12-07 17:08:32 -08:00
Max Moiseev
d0e1cb3a0e
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-07 16:43:20 -08:00