Dmitri Gribenko
27c4074bb1
stdlib: docs: fix a reference to a type that does not exist
2016-03-01 14:59:23 -08:00
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
Dmitri Gribenko
f27315b6f8
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-20 15:36:04 -08:00
Nicholas Maccharoli
7be032b146
Unify usage of shorthand
...
Use plus-equals shorthand instead of longhand throughout index.swift
2016-02-21 02:46:11 +09: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
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
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -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
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
practicalswift
d89b4d45e1
Fix typos in code (non-comment typos).
2015-12-27 13:05:01 +01:00
Max Moiseev
a7339e67ac
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-22 11:36:07 -08:00
Chris Lattner
be53728691
Mark the ++ and -- operators in the standard library as deprecated for Swift 2.2,
...
to be removed in Swift 3.0. I plan to improve the QoI of this deprecation in a
subsequent commit.
2015-12-21 22:10:25 -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
Chris Lattner
99fcb2dfe1
Change all uses of x = x.successor() to use x._successorInPlace()
...
...because it is apparently more efficient in some cases. Technically
we don't do this in ALL places, because it would be unfortunate if
the implementation of _successorInPlace() were self recursive :-)
2015-12-16 22:38:37 -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
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
Niels Andriesse
f725352706
Update BidirectionalIndexType.advancedBy(_:_:) for removal of ++ operator
2015-12-16 14:39:35 +11:00
Niels Andriesse
7807fe7160
Update BidirectionalIndexType.advancedBy(_:) for removal of ++ operator
2015-12-16 14:26:17 +11:00
Maxim Moiseev
b702b1a903
more number type renames
2015-12-10 17:08:41 -08:00
Maxim Moiseev
c678a839dc
IndexType => Index
2015-12-09 17:16:42 -08:00
Maxim Moiseev
7e2466c14e
CollectionType => Collection
2015-12-09 17:12:48 -08:00
Dmitri Gribenko
174d475833
stdlib: Remove unavavailable APIs that were left as migration aids
...
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.
Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Jordan Rose
cf8baedee2
Re-apply "Rename @transparent to @_transparent for now."
...
This re-applies 90fcbfe9a6 . I'll be committing
the corresponding change to Foundation momentarily.
2015-11-16 10:53:56 -08:00
Xin Tong
16843684b2
Revert "Rename @transparent to @_transparent for now."
...
This reverts commit 90fcbfe9a6 .
Seems there are still some tests that are left not modified.
2015-11-14 07:04:31 -08:00
Jordan Rose
90fcbfe9a6
Rename @transparent to @_transparent for now.
...
This feature has not been fully designed, let alone properly implemented.
For more information, see docs/TransparentAttr.rst.
2015-11-13 16:25:34 -08:00
Dmitri Hrybenko
bb3b00a0e0
stdlib: work around type checker not being able to deduce
...
RandomAccessIndexType.Distance
Fixes rdar://22373461, works around rdar://22381498
Swift SVN r31384
2015-08-21 18:18:23 +00:00
Dmitri Hrybenko
dd3194a18c
stdlib: adopt @warn_unused_result
...
rdar://20957486
Swift SVN r31048
2015-08-06 14:53:18 +00:00
David Farler
313a4c93c6
Review: Index protocol extensions
...
- Add Strict/Defaulted Index types to StdlibUnittest
- Test whether a random access index calls its more efficient
customization by tracking successor calls.
- Fix the RandomAccessIndex.advancedBy(n, limit:) API by de-underscoring
the limit parameter
- Inline some internal transparent default implementations to their only
call site
- Attach _RandomAccessAmbiguity type to RandomAccessIndex
rdar://problem/22085119
Swift SVN r30979
2015-08-04 03:13:14 +00:00
David Farler
311baf73cf
Index protocol extensions
...
- Remove free Swift functions for advance and distance and replace
them with protocol extension methods:
- advancedBy(n)
- advancedBy(n, limit:)
- distanceTo(end)
- Modernize the Index tests
- Use StdlibUnittest
- Test for custom implementation dispatch
Perf impact: No significant changes reported in the
Swift Performance Measurement Tool.
rdar://problem/22085119
Swift SVN r30958
2015-08-03 20:06:44 +00:00
Dmitri Hrybenko
e5e4335fad
stdlib: Slice: trap on out-of-bounds indices
...
rdar://21822657
Swift SVN r30269
2015-07-16 18:22:40 +00:00
Dave Abrahams
b650ca7b6d
[stdlib] Fix a bug in advance(start, n, end)
...
Long-standing bug: it didn't work for random access indices
when start == end!
Swift SVN r29982
2015-07-08 18:37:11 +00:00
Doug Gregor
17884f173a
Stop declaring function parameters without names, e.g., "func f(Int)".
...
Swift SVN r29607
2015-06-24 16:01:31 +00:00
Greg Parker
6c812d0751
[stdlib] Reinstate r29043 "strip final from protocol extensions".
...
This reverts r29050. This wasn't the change that broke the SourceKit tests.
Swift SVN r29052
2015-05-27 01:52:17 +00:00
Greg Parker
16a3b8ebd7
[stdlib] Revert "strip final from protocol extensions".
...
SourceKit tests need to be updated.
Swift SVN r29050
2015-05-27 01:34:45 +00:00
Dave Abrahams
1f1643221d
[stdlib] strip final from protocol extensions
...
Now that we've lifted the requirement
Swift SVN r29043
2015-05-26 23:52:36 +00:00
Dave Abrahams
ed6c0dd49a
[stdlib] ~>_distanceTo() => method
...
Swift SVN r29004
2015-05-25 04:59:04 +00:00
Dave Abrahams
f56efcbe67
[stdlib] Kill _RandomAccessIndexType
...
Swift SVN r28970
2015-05-23 18:52:24 +00:00
Dave Abrahams
4d4e62694f
Kill _BidirectionalIndexType
...
Swift SVN r28968
2015-05-23 18:28:08 +00:00
Doug Gregor
24740be7d9
Eliminate _IncrementableDefaultsType, _BidirectionalIndexDefaultsType
...
Swift SVN r28950
2015-05-23 03:40:42 +00:00