Nate Cook
34773e9612
[New indexing model] Revise documentation for collections
...
- Revised outdated descriptions
- Added missing documentation comment blocks
- Added preconditions where possible now that Index: Comparable
2016-04-07 16:53:11 -05:00
Dmitri Gribenko
2cc9c3f949
stdlib: remove incorrect @warn_unused_result attributes
2016-04-07 14:20:56 -07:00
Dmitri Gribenko
6131df64d2
stdlib: make _preprocessingPass rethrowing and add tests
2016-04-06 23:22:26 -07:00
Dave Abrahams
fc5b8c2b4d
[stdlib] Restore mistakenly killed preconditions
2016-04-06 17:54:56 -07:00
Dave Abrahams
3e4e108c4b
[stdlib] Clean up some diagnostics
2016-04-06 17:34:00 -07:00
Dave Abrahams
80cf1171b7
[stdlib] Remove unreachable precondition failures
...
The invariants of ranges guarantee that these can't fail once we've
passed the previous two.
2016-04-06 17:34:00 -07:00
Dave Abrahams
94771b4a39
[stdlib] Update indexing model doc comments
...
Also fix some diagnostics
2016-04-06 17:34:00 -07:00
Dmitri Gribenko
912ac2658c
New indexing model: improve a FIXME
2016-04-06 13:20:32 -07:00
Dave Abrahams
1798fc8f84
[stdlib] Doc comment update WIP
2016-04-05 15:16:13 -07:00
Dave Abrahams
ccb7ae0d0b
[stdlib] Drop Type suffixes in comments
...
These suffixes were gone in the code long ago; help the comments catch
up.
2016-04-05 15:16:13 -07:00
Dmitri Gribenko
6985b958fd
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-04 11:42:17 -07:00
Dmitri Gribenko
999aceb682
stdlib: correct fixits for 'func generator()'
...
rdar://problem/25492963
2016-04-01 10:48:48 -07:00
Dmitri Gribenko
df73cd2f5d
New indexing model: reorder preconditions to make more sense
2016-03-29 16:34:55 -07:00
Dave Abrahams
a5c3c63c3d
[stdlib] Indexing model: nix RangeOfStrideable
...
Instead, use CountableRange which is constrained to have a Strideable
Bound whose Stride conforms to Integer.
2016-03-28 17:06:09 -07:00
Dave Abrahams
25baede4bb
[stdlib] indexing model: add formIndex
2016-03-28 13:47:40 -07:00
Dave Abrahams
da5c4036ac
func index(n: IndexDistance, stepsFrom i: Index)
...
M-x findr-query-replace
\<func advance(\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,[
]*\)by \([^(),]*\|[^(),]+([^()]*)[^(),]*\)
func index(\3\2stepsFrom \1
2016-03-28 13:23:04 -07:00
Dave Abrahams
81d3e8ca83
limit: => limitedBy:, pt 2
...
M-x findr-query-replace
\<limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\))\( *\(?:[^ -]\|-[^>]\)\)
limitedBy: \1)\2
2016-03-28 13:12:02 -07:00
Dave Abrahams
4d651f8fc0
limit: => limitedBy:, pt 1
...
M-x findr-query-replace
\(,[
]*\)limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\)) ->
\1limitedBy limit: \2) ->
2016-03-28 13:03:59 -07:00
Dave Abrahams
01127b32d5
index(n, stepsFrom: i)
...
M-x findr-query-replace
\<advance(\([^:]+?\),\([
]+\)by: *\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,\(?:[
]+\)limit: *\(?:[^()]*\|[^()]+([^()]*)[^()]*\)\)?)
index(\3,\2stepsFrom: \1\4)
2016-03-25 17:54:39 -07:00
Dave Abrahams
11259d1d14
[stdlib] indexing model: rename in-place indexing
...
This time, choose something that's at least compliant with the API
guidelines.
2016-03-23 17:16:20 -07:00
Dave Abrahams
8d9e62b274
[stdlib] indexing model: rename next/previous
...
I'm not too satisfied with the names for the updating: versions, but
this is a start.
2016-03-22 17:13:54 -07:00
Dmitri Gribenko
a6cd57222a
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-21 14:41:15 -07:00
Dmitri Gribenko
95d2e11e7e
New indexing model: add Indexable.IndexDistance
...
This is required to forward the IndexDistance typealias in Slice* types.
Unfortunately, making this change required working around a compiler
bug, so I had to split Indexable into IndexableBase and Indexable.
2016-03-18 23:50:59 -07:00
Dmitri Gribenko
3ad0fa8248
New indexing model: remove a TODO that was fixed
2016-03-18 23:25:00 -07:00
Dmitri Gribenko
59f07708ac
stdlib: add a FIXME to remove Indexable
2016-03-18 23:23:36 -07:00
Dmitri Gribenko
941235c25e
New indexing model: remove a duplicate API
2016-03-18 23:03:19 -07:00
Dmitri Gribenko
92fe2dca0b
New indexing model: remove a FIXME that is fixed
2016-03-18 23:03:19 -07:00
Dave Abrahams
a9dd95c37a
[stdlib] indexing model: Generic Mutable Slicing
2016-03-18 15:08:40 -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
d6c0c8a594
[stdlib] indexing model: Slicing overloads
...
Support slicing with all the kinds of Ranges
2016-03-17 14:45:11 -07:00
Dave Abrahams
17f841430c
Merge Range work
2016-03-16 15:59:39 -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
Patrick Pijnappel
77b4d73560
[stdlib] Replace stray usages of generator by iterator
2016-03-17 06:07:20 +11: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
Dmitri Gribenko
544411c270
stdlib: fix coding style
2016-03-14 18:59:27 -07:00
Dmitri Gribenko
45d45589a6
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 16:02:40 -08:00
practicalswift
a773051b2b
[gardening] Fix recently introduced typo: "peoperty" → "property"
2016-03-12 21:15:30 +01:00
Dmitri Gribenko
3cde854287
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 01:11:32 -08:00
Daniel Duan
276370b599
[stdlib] apply SE-0040 to stdlib
2016-03-11 16:01:41 -08:00
Dmitri Gribenko
64ae69be88
New indexing model: add FIXMEs for tests that need to be written
2016-03-11 01:38:16 -08:00
Dmitri Gribenko
edc18682f2
New indexing model: default implementation for Collection._failEarlyRangeCheck()
2016-03-11 01:36:48 -08:00
Dmitri Gribenko
e8bc77e5b8
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-11 00:20:34 -08:00
Dmitri Gribenko
d84ee1f6a1
swift-3-indexing-model: remove a TODO: IndexingIterator seems to compile fine now
2016-03-10 17:29:26 -08:00
practicalswift
5b028d0651
[gardening] Fix recently introduced typo: " " → " "
...
[gardening] Fix recently introduced typo: "a initializer" → "an initializer"
[gardening] Fix recently introduced typo: "charaters" → "characters"
[gardening] Fix recently introduced typo: "fullfilled" → "fulfilled"
[gardening] Fix recently introduced typo: "initalizer" → "initializer"
[gardening] Fix recently introduced typo: "peoperty" → "property"
[gardening] Fix recently introduced typo: "reparing" → "repairing"
[gardening] Fix recently introduced typo: "spilt" → "split"
2016-03-10 11:52:02 +01:00
Shawn Erickson
68ff64357c
Changed _failEarlyRangeCheck(rangeStart: ... boundsEnd:) --> _failEarlyRangeCheck(range:, bounds:)
2016-03-07 09:57:48 -08:00
Shawn Erickson
2a69d24688
fleshed out BidirectionalCollection previous(Index) and friends
2016-03-07 09:38:41 -08:00
Shawn Erickson
175c3cd136
dealt with issues and suggestions outlined in PR1559
2016-03-06 22:13:18 -08:00
Shawn Erickson
0db3a29987
fleshing out Collection.next(Index)
...
-removed fatal stub Collection.next(Index)
-added default Collection.next(Index) where Index is Strideable
-added custom next(Index) on some collections
-added fatal stub next(Index) on some collections
2016-03-06 17:37:40 -08:00
Dmitri Gribenko
ad1428e1d6
New collection indexing model: removed old index protocols
...
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00