Dmitri Gribenko
fc8d62dfbb
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-18 14:40:06 -07:00
Chris Lattner
e80769d6a8
Bit isn't deprecated, it is removed. Tweak a message.
2016-04-16 23:01:06 -07:00
Dmitri Gribenko
2b35fea059
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-16 00:30:12 -07:00
Chris Lattner
4fd8418ba7
move the stdlib to put noescape and autoclosure on the type, instead of
...
the parameter. Progress towards SE-0049.
2016-04-14 23:13:43 -07:00
Dmitri Gribenko
c52787e900
Merge commit '9cdbec13eee72feccfc5f8b987882a8c52e8107b' into swift-3-indexing-model
2016-04-14 16:23:53 -07:00
Dmitri Gribenko
3e708a9328
Merge commit '8e292daec1bc790c96b5ee39b8d55dadcac6ce1b' into swift-3-indexing-model
2016-04-14 15:10:26 -07:00
Dmitri Gribenko
735f1287b0
Merge remote-tracking branch 'origin/swift-3-indexing-model' into swift-3-indexing-model
2016-04-14 14:10:27 -07:00
Dmitri Gribenko
10697f939f
Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model
2016-04-14 13:45:27 -07:00
Max Moiseev
37bf02f7da
[stdlib][swift-3-indexing-model] changes in index(_:stepsFrom:limitedBy:)
...
- index(_:stepsFrom:limitedBy:) returns Index?
- formIndex(_:stepsFrom:limitedBy) returns Bool
2016-04-14 11:49:27 -07:00
Jordan Rose
bc83940301
Make pointer nullability explicit using Optional.
...
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md
- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
(like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.
I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)
The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
2016-04-11 20:06:38 -07:00
Nate Cook
6b77c6a979
[New indexing model] Update documentation comments with new APIs
...
Most of these were successor() -> successor(of:).
2016-04-08 01:01:58 -05:00
Trent Nadeau
f96ad263a8
Added @discardableResult attr to mutating functions
2016-04-07 23:27:38 +00:00
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
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04: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