Arsen Gasparyan
9f728c6dbd
[stdlib] Make comparison operator choices consistent
2015-12-16 22:50:36 +03: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
Dmitri Gribenko
8749117362
Merge pull request #571 from nassersala/typo-print-dot-swift
...
Fix typos: add missing backticks to 'Streamable'
2015-12-15 17:41:56 -08:00
Dmitri Gribenko
2f538f8b2b
Merge pull request #568 from frootloops/enumerate-generator-count
...
Set default value for EnumerateGenerator.count
2015-12-15 17:41:37 -08:00
Dmitri Gribenko
d864cfcf3d
Merge pull request #556 from dduan/increment_decrement_search_replace
...
replace singular statement ++/-- with += 1/-= 1 for integer variables
2015-12-15 17:39:29 -08:00
Doug Gregor
2f5f94a12c
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-15 17:11:37 -08:00
Nasser Ali AlZahrani
26669bd28e
Fix typos: add missing backticks to 'Streamable'
2015-12-16 11:28:03 +11:00
Max Moiseev
2021dd5a4d
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-15 12:49:22 -08:00
Arsen Gasparyan
ee97757756
Set default value
2015-12-15 23:30:08 +03:00
Dmitri Gribenko
f25bf9eaf7
Merge pull request #544 from nielsandriesse/patch-11
...
Update _DropFirstSequence.next() for removal of ++ operator
2015-12-15 09:42:09 -08:00
Daniel Duan
ebb0c3a204
replaced single-line ++/-- with +=/-=
2015-12-15 09:05:37 -08:00
Dmitri Gribenko
10a8f4e3f9
Merge pull request #348 from wczekalski/bugfix/float-string-precision
...
Fix precision of float to string to max significant decimals
2015-12-15 02:41:49 -08:00
Chris Lattner
566d6a1728
Merge pull request #479 from PatrickPijnappel/spelling-grammar
...
[stdlib] Fix spelling & grammar
2015-12-14 20:10:46 -08:00
Dmitri Gribenko
8b88e5e446
Merge pull request #545 from nielsandriesse/patch-12
...
Update _PrefixSequence.next() for removal of ++ operator
2015-12-14 20:03:13 -08:00
Niels Andriesse
380c4e53c8
Update CollectionType.split(_:_:_:) for removal of ++ operator
2015-12-15 11:51:55 +11:00
Niels Andriesse
967ac96bb1
Update _PrefixSequence.next() for removal of ++ operator
2015-12-15 11:16:42 +11:00
Niels Andriesse
0e71b9277d
Update _DropFirstSequence.next() for removal of ++ operator
2015-12-15 11:04:41 +11:00
Max Moiseev
806be29941
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-14 12:05:35 -08:00
Wojtek Czekalski
10b61b7d8c
Made floating point numbers conform to CustomDebugStringConvertible
...
debugDescription prints numbers with greater precision
2015-12-14 19:25:14 +01:00
Wojtek Czekalski
e4fe5f1508
Introduced debug parameter in floating point to string conversion
2015-12-14 19:25:13 +01:00
Dmitri Gribenko
931b07fb62
Merge pull request #474 from PatrickPijnappel/patch-3
...
Expand tuple properties in Zip2Sequence/Generator
2015-12-14 02:45:37 -08:00
Chris Willmore
070d11031d
Merge pull request #452 from dayitv89/gds-Fixtypos_cstring
...
Fix typo "nul-terminated" -> "null-terminated"
2015-12-13 21:06:42 -08:00
Dmitri Gribenko
a014eab642
Merge pull request #490 from kballard/swap-docstring-requires
...
[stdlib] Add note to swap() docstring about non-aliasing requirement
2015-12-13 18:03:49 -08:00
Arnold Schwaighofer
391237b134
Use subscript get for all array like types
...
Given SR-219 and the fact that we can't hoist uniqueness checks in the current
form using a plain subscript getter is not worse.
2015-12-13 17:25:41 -08:00
Kevin Ballard
a8833b5873
[stdlib] Add note to swap() docstring about non-aliasing requirement
2015-12-13 13:54:17 -08:00
Niels Andriesse
1c9eb6cfac
Update _transcodeSomeUTF16AsUTF8(_:_:) for removal of ++ operator
2015-12-13 23:09:42 +11:00
Patrick Pijnappel
bbe0e514a2
[stdlib] Fix capitalization
2015-12-13 21:37:44 +11:00
Patrick Pijnappel
86e25e7e57
[stdlib] Fix word join grammar
2015-12-13 21:37:31 +11:00
Patrick Pijnappel
4aa89978d2
[stdlib] Fix typos
2015-12-13 21:35:53 +11:00
Patrick Pijnappel
4db650d01f
De-joined property declarations
2015-12-13 20:08:29 +11:00
Patrick Pijnappel
c86e4a800b
Expand tuple properties in Zip2Sequence/Generator
...
The previous arrangement made the numbering inconsistent, e.g. `baseStreams.1` was of type `Generator2`.
2015-12-13 19:39:14 +11:00
Dmitri Gribenko
ecd3c07a86
Merge pull request #466 from PatrickPijnappel/doc-nil
...
[stdlib] Add missing backticks around nil in docs
2015-12-12 19:56:23 -08:00
Dmitri Gribenko
0cf9b3e361
Merge pull request #470 from PatrickPijnappel/implicit-optionals
...
[stdlib] Replace `.Some(x)` and `.None` by `x` and `nil`, respectively
2015-12-12 19:55:34 -08:00
Niels Andriesse
d7bbee1e6b
Update LazyFilterCollection.startIndex for removal of ++ operator
...
SIL is identical: https://gist.github.com/nielsandriesse/90761d98194b5f15a536
2015-12-13 12:33:37 +11:00
Chris Willmore
54be4fc3ff
Remove @_transparent annotation from _undefined().
...
Following comments from Dmitri on c99c02b .
2015-12-12 17:12:44 -08:00
Patrick Pijnappel
668e7101eb
[stdlib] Replace .None by nil in doc comments
2015-12-13 12:10:43 +11:00
Patrick Pijnappel
95622c435b
[stdlib] Replace .Some(x) and .None by x and nil, respectively
2015-12-13 12:10:43 +11:00
Dmitri Gribenko
b9175c2a38
Merge pull request #443 from nielsandriesse/patch-3
...
Update IndexingGenerator.next() function for removal of ++ operator
2015-12-12 15:38:56 -08:00
Chris Lattner
778d66a72d
Merge pull request #445 from nielsandriesse/patch-5
...
Update RangeGenerator.next() function for removal of ++ operator
2015-12-12 15:18:37 -08:00
Niels Andriesse
7275aa2c84
Change element to result
2015-12-13 10:16:52 +11:00
Dmitri Gribenko
9359b8a9f7
Merge pull request #465 from nielsandriesse/patch-7
...
Fix inconsistent indentation
2015-12-12 15:05:25 -08:00
Dmitri Gribenko
1808766152
Merge pull request #366 from PatrickPijnappel/patch-2
...
Fix comment in Zip2
2015-12-12 15:04:33 -08:00
Niels Andriesse
7398a88d2c
Fix documentation
2015-12-13 09:44:00 +11:00
Patrick Pijnappel
6838f300b1
[stdlib] Add missing backticks around nil in docs
2015-12-13 09:40:49 +11:00
Niels Andriesse
a67ef174c0
Fix inconsistent indentation
2015-12-13 09:32:18 +11:00
Niels Andriesse
41d1589f95
Make local variable name more expressive
2015-12-13 09:21:04 +11:00
Patrick Pijnappel
92c8cdabe4
[stdlib] Unabbreviate local variable names
2015-12-13 08:43:24 +11:00
Greg Parker
1cc2fdd0b4
Merge pull request #339 from cielavenir/patch-1
...
Add withVaList() for environments without ObjC
2015-12-12 13:37:47 -08:00