Dmitri Hrybenko
ba4c959f1a
stdlib: correct the comment on Unsafe{,Mutable}Pointer.memory
...
Patch by Alex Martini.
Swift SVN r28655
2015-05-16 00:51:40 +00:00
John McCall
312a9c1f6e
Clean up correctly if a variadic argument throws.
...
rdar://20942603
Swift SVN r28622
2015-05-15 08:20:36 +00:00
Dmitri Hrybenko
d8d50e1815
stdlib: in Array bridging code, use the same pattern as Set and Dictionary use
...
Also, simplify the code by removing an unused parameter. NFC.
Swift SVN r28607
2015-05-15 03:44:37 +00:00
Dmitri Hrybenko
25d9a4fe32
stdlib: protocol extensions: de-underscore filter()
...
The API was adjusted according to the API review previously.
Swift SVN r28592
2015-05-15 00:37:01 +00:00
Dmitri Hrybenko
b1b9a91663
stdlib: push Array's specialization of filter() to CollectionType
...
This way, the specialization is more generally applicable.
Swift SVN r28561
2015-05-14 05:55:20 +00:00
Dmitri Hrybenko
6274168959
stdlib: move _SequenceDefaultsType extensions to SequenceType
...
Now compiler supports this arrangement. It provides a better generated
interface.
Swift SVN r28557
2015-05-14 04:06:48 +00:00
Dmitri Hrybenko
71ef0c2296
stdlib: rearrange declarations to be more logically grouped together
...
Swift SVN r28556
2015-05-14 04:06:46 +00:00
Dmitri Hrybenko
843d8a4eb7
stdlib: protocol extensions: de-underscore map()
...
Swift SVN r28502
2015-05-13 01:58:46 +00:00
Ted Kremenek
7f1119f690
Underscore properties of ErrorType.
...
The internal details of ErrorType are still being designed.
They should be underscored in the meantime to
indicate they are still evolving.
Implements rdar://problem/20927102.
Swift SVN r28500
2015-05-13 00:24:09 +00:00
Dmitri Hrybenko
efed32e6bc
stdlib: indent doc comment per coding style
...
Swift SVN r28496
2015-05-12 23:17: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
Dmitri Hrybenko
68ef59e37a
stdlib: Convert comments to use '- requires:' instead of 'Requires:'.
...
Tidy misc. comments and markdown along the way.
Patch by Brian Lanier.
Swift SVN r28473
2015-05-12 17:47:11 +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
Dave Abrahams
106b39a497
[stdlib] Indent bullet continuations in doc comments
...
The text is a lot more readable that way.
Swift SVN r28471
2015-05-12 16:59:08 +00:00
Dmitri Hrybenko
a8ee15331e
Add periods and blank lines between abstracts and discussions.
...
Patch by Alex Martini.
Swift SVN r28466
2015-05-12 07:39:53 +00:00
Dmitri Hrybenko
1bc7b4c226
Move requirements out of abstracts.
...
Searched for "/// ..*Requires:" and did manual replacements.
Patch by Alex Martini.
Swift SVN r28465
2015-05-12 07:39:52 +00:00
Dmitri Hrybenko
631a4eff32
Move return descriptions out of abstracts.
...
Searched for "(?<!- )returns:" and did manual replacements.
Patch by Alex Martini.
Swift SVN r28464
2015-05-12 07:39:51 +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
Dmitri Hrybenko
4925bda845
stdlib: make 'first' dynamically dispatched so that it can be made fast
...
on Dictionary and Set
Swift SVN r28453
2015-05-12 04:46:26 +00:00
Dmitri Hrybenko
33276a4014
stdlib: make _prext_filter() return an Array<Element> for all collections
...
Swift SVN r28451
2015-05-12 03:02:58 +00:00
Dave Abrahams
ee8daf63d7
Yon semicolon doth offend mine eye
...
Swift SVN r28450
2015-05-12 01:56:39 +00:00
Enrico Granata
68ba7a7cfa
Revert the reversal of Mirror for Mirror
...
Third take might be the charm after all
Swift SVN r28443
2015-05-11 21:25:28 +00:00
Dmitri Hrybenko
61214ec55b
stdlib: remove Sliceable conformance from String
...
Swift SVN r28442
2015-05-11 20:58:31 +00:00
Dave Abrahams
f8e5d28465
[stdlib] Remove needless "let"s
...
Simpler is better.
Swift SVN r28434
2015-05-11 19:34:26 +00:00
Dmitri Hrybenko
e63d851040
stdlib: fix up a doc comment
...
Patch by Alex Martini.
Swift SVN r28432
2015-05-11 18:52:25 +00:00
Slava Pestov
d2a5fbd94a
Implement reflection on instances of empty and single-payload enums
...
This change attempts to introduce the functionality without being too
disruptive. After we branch, I want to consolidate some of the runtime
functions and implement this functionality for multi-payload enums
as well, which requires adding new runtime metadata.
Example:
(swift) enum Color { case Red, Green, Blue(Int) }
(swift) print(Color.Red)
REPL.Color.Red
(swift) print(Color.Blue(5))
REPL.Color.Blue(5)
Implements <rdar://problem/18334936>.
Swift SVN r28430
2015-05-11 18:21:39 +00:00
Dave Abrahams
918b323565
[stdlib] Suppress some new warnings
...
Swift SVN r28420
2015-05-11 16:18:55 +00:00
Dmitri Hrybenko
7ac7eba882
stdlib: make map() dynamically dispatched
...
This change tries to recover the performance regression in map() that
was caused by moving map() to a protocol extension and degrading the
static type information (when mapping a collection, we only know that it
is a sequence). Adding map() to the witness table allows us to provide
a specialized implementation for collections, and hopefully recover the
lost performance.
Swift SVN r28416
2015-05-11 15:59:02 +00:00
Chris Lattner
39dc866eb2
tweak a couple of more files in the build to strength reduce from var -> let.
...
Swift SVN r28410
2015-05-11 06:06:40 +00:00
Chris Lattner
934bbd0a42
more stdlib hygiene
...
Swift SVN r28393
2015-05-10 06:35:15 +00:00
Chris Lattner
c1df892d47
improve stdlib hygiene a bit.
...
Swift SVN r28392
2015-05-10 02:55:18 +00:00
Chris Lattner
47bdbfb694
fix <rdar://problem/20883147> Type annotation for 'let' condition still expected to be optional
...
Swift SVN r28360
2015-05-09 02:34:01 +00:00
Dmitri Hrybenko
0bca4219dd
stdlib: remove workarounds from _replPrintLiteralString()
...
Swift SVN r28357
2015-05-09 01:34:49 +00:00
Dmitri Hrybenko
49216037c9
Revert "Provide a Mirror for Mirror - take 2"
...
This reverts commit 28336. The compiler crashes while building the
standard library.
Swift SVN r28348
2015-05-09 00:11:02 +00:00
Enrico Granata
cf30e0724e
Provide a Mirror for Mirror - take 2
...
This time with a dictionary instead of array literal, and with a test
Unless the bots break (and I will keep a more careful eye out for that this time), this will fix rdar://problem/20861708
Swift SVN r28336
2015-05-08 23:45:54 +00:00
Dmitri Hrybenko
7776ba5a71
stdlib: clean up capitalization in doc comments
...
Patch by Brian Lanier and Alex Martini.
Swift SVN r28335
2015-05-08 23:44:05 +00:00
Doug Gregor
0749486302
Let unqualified lookup find members of protocols and extensions thereof.
...
Members of protocols found via unqualified name lookup are mapped to
their corresponding witnesses, as we do for qualified name
lookup. This is the bulk of the compiler changes for
rdar://problem/20509152. Performing this mapping for unqualified name
lookup of types will follow.
Swift SVN r28333
2015-05-08 23:22:13 +00:00
Jordan Rose
21b8312c2e
[stdlib] Make a bunch of standard library functions compile faster.
...
The targeted functions all take over a second to type-check with my debug
compiler (found using -debug-time-function-bodies). The top two---the two
replaceRange implementations---took about a minute each; this change
knocks them down to 30-40s.
All of this is just breaking expressions apart, and the expressions aren't
even that complicated. I'm concerned that we have a serious performance
regression around the use of lazy(), and I've filed rdar://problem/20875936
so we can look into it. The test change is particularly concerning; there's
a ridiculous difference between 'lazy(...).reverse()' and
'lazy(...).reverse().reverse()'.
No intended functionality change.
Swift SVN r28325
2015-05-08 21:01:50 +00:00
Dmitri Hrybenko
d6818525b4
stdlib: remove extra 'Self.' qualifications that are not needed now
...
Finishes rdar://20838229
Swift SVN r28323
2015-05-08 19:12:27 +00:00
Dave Abrahams
8bd6b330b1
[stdlib] Fix DRY violation
...
Swift SVN r28316
2015-05-08 16:53:59 +00:00
Dmitri Hrybenko
f46f16ae82
stdlib: implement new print() API
...
rdar://20775683
Swift SVN r28309
2015-05-08 01:37:59 +00:00
Ted Kremenek
9f9bb725cf
Rename '_ErrorType' to 'ErrorType'.
...
Swift SVN r28293
2015-05-07 21:59:29 +00:00
Dmitri Hrybenko
8b392eeea9
Revert "Remove Array.count, it is redundant with protocol extensions"
...
This reverts commit r28247 while we discuss the change.
Swift SVN r28292
2015-05-07 21:45:30 +00:00
Dmitri Hrybenko
10ab07ade5
Revert "Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count"
...
This reverts commit r28248 while we discuss the change.
Swift SVN r28291
2015-05-07 21:45:28 +00:00
Dmitri Hrybenko
4461d97a49
Revert "stdlib: some more count -> count() replacements."
...
This reverts commit r28256 while we discuss the change.
Swift SVN r28290
2015-05-07 21:45:21 +00:00
David Farler
27cbf6b39d
Fix 'seealso' comment in AnyGenerator
...
These code blocks weren't indented enough, so they were
getting parsed as inline HTML.
rdar://problem/20843980
Swift SVN r28258
2015-05-07 08:05:02 +00:00
Erik Eckstein
94a3cf8142
stdlib: some more count -> count() replacements.
...
Fixes the no-asserts stdlib build.
Swift SVN r28256
2015-05-07 05:47:51 +00:00
Dmitri Hrybenko
d938b93e48
stdlib: doc comment: use monospaced font for code
...
rdar://20843980
Swift SVN r28255
2015-05-07 04:59:50 +00:00
Dmitri Hrybenko
8ac6c7cf8f
Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count
...
These APIs are redundant with APIs that come from protocol extensions.
Swift SVN r28248
2015-05-07 00:30:43 +00:00
Dmitri Hrybenko
58601fafc8
Remove Array.count, it is redundant with protocol extensions
...
Swift SVN r28247
2015-05-07 00:30:41 +00:00