Commit Graph

10 Commits

Author SHA1 Message Date
David Farler
9e28dc777a Update standard library doc comments to Markdown
rdar://problem/20180478

Swift SVN r27726
2015-04-26 00:07:11 +00:00
Doug Gregor
793b3326af Implement the new rules for argument label defaults.
The rule changes are as follows:
  * All functions (introduced with the 'func' keyword) have argument
  labels for arguments beyond the first, by default. Methods are no
  longer special in this regard.
  * The presence of a default argument no longer implies an argument
  label.

The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.

With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.

Fixes rdar://problem/17218256.

Swift SVN r27704
2015-04-24 19:03:30 +00:00
Dmitri Hrybenko
ff2dd6320a stdlib: fix coding style
When colon specifies is-a relationship between types, we put spaces on
both sides of the colon.

Swift SVN r27016
2015-04-05 05:54:55 +00:00
Nadav Rotem
7ebd9f1adc Mark methods in protocol extension as final.
Swift SVN r26948
2015-04-03 19:29:20 +00:00
Ben Langmuir
0c120e5914 Reapply r26926 after fixing SourceKit test
r26926 was reverted in r26930 because of a SourceKit failure, that was
fixed in r26945.

Swift SVN r26946
2015-04-03 19:04:50 +00:00
Greg Parker
f9ca55df0f Revert r26926 which broke a SourceKit test.
Swift SVN r26930
2015-04-03 03:54:12 +00:00
Dave Abrahams
17de46f1c9 [stdlib] ExistentialCollection: perf de-regression
The performance regression that occurred when ++ and -- were added as
requirements to the Index protocols was due to the fact that it caused a
dubious hack of mine to be bypassed: when treated as indices, integer
types are incremented and decremented without overflow checking.  While
technically justifiable (see the r20576 commit message), this makes the
standard library extremely fragile and makes successor() and
predecessor() mathematically unsafe. We really should see what the
optimizer team can do to make that hack unnecessary.

In the meantime, instead of dispatching through ++ and --, use a
special, defaulted _[successor|predecessor]InPlace() method to give
indices their own, customizable in-place inc/dec-rement path.

Swift SVN r26926
2015-04-03 02:39:40 +00:00
Dave Abrahams
44bddea674 [stdlib] Protocol-dispatch ++ and -- for indices
...and take advantage of this capability to optimize AnyXXXIndex.

Swift SVN r26876
2015-04-02 17:21:45 +00:00
Dave Abrahams
d7156b0620 [stdlib] Kill obsolete comment
Swift SVN r26308
2015-03-19 18:32:13 +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