Commit Graph

41 Commits

Author SHA1 Message Date
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Michael Ilseman
ccda8f33d1 [noescape by default] Proliferate @escaping
Adds an explicit @escaping throughout the standard library, validation
test suite, and tests. This will be necessary as soon as noescape is
the default for closure parameters.
2016-07-29 13:48:07 -07:00
Dmitri Gribenko
d591f9cf7a stdlib: remove most uses of @warn_unused_result, which does nothing now
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Dave Abrahams
9bee5d182f [stdlib] location/formLocation => index/formIndex 2016-04-26 17:46:16 -07:00
Dave Abrahams
47a870cc50 [stdlib] Use location/formLocation for all index movement 2016-04-21 17:13:41 -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
ad1428e1d6 New collection indexing model: removed old index protocols
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00
Dmitri Gribenko
f0633ce5a9 stdlib: Sequence.iterator() => .makeIterator() 2016-02-23 13:52:30 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -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
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
ken0nek
e7e70cea92 Add spaces before and after closure arrow in stdlib 2015-12-23 04:52:15 +09: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
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
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00
Patrick Pijnappel
95622c435b [stdlib] Replace .Some(x) and .None by x and nil, respectively 2015-12-13 12:10:43 +11: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
1c0047829a Rename SequenceType.generate() to SequenceType.iterator() 2015-12-09 17:11:17 -08:00
Dmitri Gribenko
31598d41bf Rename GeneratorType to IteratorProtocol 2015-12-07 17:08:32 -08:00
Ge Sen
20030242bd Erase redundant whitespaces. 2015-12-05 12:11:47 +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
Dmitri Hrybenko
f7612273cf stdlib: simplify AnyGenerator API
Change the non-final class into a struct, and migrate global functions
into initializers.

rdar://21878289

Swift SVN r32137
2015-09-22 00:23:10 +00:00
David Farler
4d17bf0691 Remove SinkType and SinkOf
Remove these standard library types in favor of (T) -> () closures.

It was originally believed that generic optimizations would make these
types profitable, however:

// FIXME: Insert benchmarks here.

rdar://problem/21663799

Swift SVN r29927
2015-07-07 00:36:12 +00:00
Dmitri Hrybenko
313701286b stdlib: Various punctuation and markup improvements to the comments.
Patch by Brian Lanier.

Swift SVN r28659
2015-05-16 03:04:51 +00:00
Ted Kremenek
62feb5c949 Change @availability to @available.
This came out of today's language review meeting.
The intent is to match #available with the attribute
that describes availability.

This is a divergence from Objective-C.

Swift SVN r28484
2015-05-12 20:06:13 +00:00
Dave Abrahams
5c55682d8b [stdlib] Capitalize keywords in doc comments
Again, the text is a lot more readable that way.

Swift SVN r28472
2015-05-12 16:59:13 +00:00
Ted Kremenek
42cccf07b2 Make CFunctionPointer, GeneratorOf, SequenceOf unavailable.
Implements rdar://problem/20477688

Swift SVN r28459
2015-05-12 06:28:02 +00:00
David Farler
9e28dc777a Update standard library doc comments to Markdown
rdar://problem/20180478

Swift SVN r27726
2015-04-26 00:07:11 +00:00
Dmitri Hrybenko
971718b45c stdlib: mark declarations that we plan to remove as deprecated
Swift SVN r27437
2015-04-17 18:15:00 +00:00
Dave Abrahams
72585a7bdd [stdlib] Restore GeneratorOf/SequenceOf for staging
Let's keep internal projects building for a while

Swift SVN r27128
2015-04-08 18:10:19 +00:00
Dave Abrahams
0464c3d957 [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
Retire the old components now that the new ones have passed API review.

<rdar://20406937> covers the migration fallout of this change.

Swift SVN r27092
2015-04-07 20:32:31 +00:00
Michael Gottesman
2c143aee96 Revert "[stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]"
This reverts commit r27081. It broke the build.

Swift SVN r27086
2015-04-07 17:21:03 +00:00
Dave Abrahams
a80b1a4caa [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
Retire the old components now that the new ones have passed API review.

<rdar://20406937> covers the migration fallout of this change.

Swift SVN r27081
2015-04-07 15:20:40 +00:00
Michael Gottesman
0255a5b948 Revert "[stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]"
This reverts commit r26904. Fixing the build.

Swift SVN r26912
2015-04-02 22:55:30 +00:00
Dave Abrahams
0b40374d10 [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
Retire the old components now that the new ones have passed API review.

<rdar://20406937> covers the migration fallout of this change.

Swift SVN r26904
2015-04-02 21:55:22 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00