Dmitri Hrybenko
d97ac3e64c
stdlib: rename RangeReplaceableCollectionType.extend() to appendContentsOf()
...
rdar://21972324
Swift SVN r30607
2015-07-25 00:36:37 +00:00
Joe Groff
b0ec0d6da4
Revert "stdlib: Mark many higher-order function interfaces as 'rethrows'."
...
This reverts commit r30597, to help detangle it from other potentially-breaking changes that landed
on the bots simultaneously.
Swift SVN r30602
2015-07-24 23:31:59 +00:00
Joe Groff
4be02cab5b
stdlib: Mark many higher-order function interfaces as 'rethrows'.
...
This covers:
- Lifetime-extending wrappers, like withExtendedLifetime, withCString, and withUnsafe*Pointer
- 'map' and friends on Optional
- 'indexOf'
A few APIs I haven't gotten to yet in this first pass:
- Autoclosure APIs, like assert, &&, etc.
- the 'isOrderedBefore' predicate for sorting APIs. The sorting implementation does some microoptimizations with 'inout' closures that violate rethrows checking.
- Strict 'map', 'filter', and friends on CollectionType. These need some plumbing in Lazy to be able to thread a Result-forming transformation through.
Swift SVN r30597
2015-07-24 22:52:23 +00:00
Ted Kremenek
771761f9f6
Re-apply "stdlib: eliminate unused typealias and tidy up the doc comment""
...
This reverts commit r30468.
It's not clear if the original commit caused a build regression, but it appears to be resolved now.
Swift SVN r30469
2015-07-21 22:30:59 +00:00
Ted Kremenek
3f41e175b3
Revert "stdlib: eliminate unused typealias and tidy up the doc comment"
...
This reverts commit r30458.
This is breaking test 'Swift :: stdlib/Algorithm.swift.gyb'
Swift SVN r30468
2015-07-21 22:10:21 +00:00
Dmitri Hrybenko
8d4866ae9b
stdlib: eliminate unused typealias and tidy up the doc comment
...
Swift SVN r30458
2015-07-21 20:40:37 +00:00
Joe Groff
6608221a72
stdlib: Remove _UnitTestArray.
...
rdar://problem/20246497
Swift SVN r30348
2015-07-18 00:14:28 +00:00
David Farler
241de1a1c3
Add popFirst/popLast implementations for some collections
...
Add the following non-customizable implementations:
- popFirst/popLast for Collections whose SubSequence == Self.
- Array.popLast
- ContiguousArray.popLast
- Set.popFirst
- Dictionary.popFirst
Swift SVN r30278
2015-07-16 22:52:05 +00:00
Mark Lacey
da983196a3
Add a specialization of extend for collections.
...
The specialization uses += operator for collections, which performs much
better than the += operator for sequences.
The extend benchmark from rdar://problem/21689050 improves by:
- 2500x with -O
- 15x with -O -whole-module-optimization
Unfortunately we still seem to be about 100x slower than the user's
memcpy version of the same benchmark with -O -whole-module-optimization.
Swift SVN r30033
2015-07-09 18:28:03 +00:00
Mark Lacey
9c713556d7
Remove a work-around from extend().
...
The test case in the radar appears to compile without issue now, and
moving this code back inline appears to work.
Swift SVN r29992
2015-07-08 20:56:08 +00:00
Dave Abrahams
fb241acf6f
[stdlib] kill __ArrayType
...
Swift SVN r29895
2015-07-02 18:47:05 +00:00
David Farler
438119d558
Fold ExtensibleCollectionType into RangeRaplaceableCollectionType
...
ExtensibleCollectionType's operations can all be represented by the
primitive range replacement operation, so fold it into
RangeReplaceableCollectionType.
In addition, provide default implementations of
RangeReplaceableCollectionType's methods.
- New tests added for combinations of (static, generic) calls and
(default, custom) implementations.
- Mark free Swift functions as unavailable with a message to direct the
developer to the protocol methods.
- Mark ExtensibleCollectionType as available with a message added to
direct the developer to the right protocol.
rdar://problem/18220295
Swift SVN r29857
2015-07-01 22:33:04 +00:00
Dmitri Hrybenko
80b1380fe8
stdlib: fold Sliceable into CollectionType and de-underscore SubSequence
...
Swift SVN r29845
2015-07-01 18:31:25 +00:00
Dmitri Hrybenko
4eb24da01b
stdlib: underscore MirrorType
...
Part of removing the old mirrors.
rdar://21428474
Swift SVN r29833
2015-07-01 04:05:48 +00:00
Dmitri Hrybenko
7ee84ed6b3
stdlib: rename Reflectable.{getMirror() -> _getMirror()}
...
Start removing the old mirrors.
rdar://21428474
Swift SVN r29823
2015-07-01 00:31:32 +00:00
Dmitri Hrybenko
82122f9362
stdlib: fixit-based migrations for generic parameter renames
...
rdar://21538940
Swift SVN r29756
2015-06-27 04:06:27 +00:00
Dmitri Hrybenko
51e236c609
stdlib: rename Array's generic parameter from T to Element
...
Same for ArraySlice and ContiguousArray.
Part of rdar://21429126
Swift SVN r29618
2015-06-24 20:41:49 +00:00
Dmitri Hrybenko
57d85f70d7
stdlib: eliminate redundant implementations of 'generate()'
...
Swift SVN r29617
2015-06-24 20:41:47 +00:00
Doug Gregor
17884f173a
Stop declaring function parameters without names, e.g., "func f(Int)".
...
Swift SVN r29607
2015-06-24 16:01:31 +00:00
Dave Abrahams
f0fac67917
Revert "[stdlib] join() => protocol extension"
...
This reverts r29467; it hasn't passed through API review yet.
Swift SVN r29470
2015-06-17 23:21:14 +00:00
Dave Abrahams
3299e1be4c
[stdlib] join() => protocol extension
...
Also, un-constrain it so that the type of the sequences passed as an
argument does not have to match the type of the method target.
Swift SVN r29467
2015-06-17 23:16:56 +00:00
Argyrios Kyrtzidis
212989e3cd
[stdlib] Underscore a parameter name to hide its initializer from the interface.
...
Verified by Dmitri.
Swift SVN r29196
2015-06-01 00:26:47 +00:00
Dave Abrahams
1175d3602c
[stdlib] Underscore the legacy Reflectable protocol
...
We don't want anyone using this and hope to remove it before GM, so
let's at least make its imminent death more obvious.
Swift SVN r29075
2015-05-27 20:59:24 +00:00
Dmitri Hrybenko
77c76071f2
stdlib: fix coding style
...
Swift SVN r29012
2015-05-25 19:16:18 +00:00
Dmitri Hrybenko
ba25a872cf
stdlib: fix code that should be rejected by the complier
...
Compiler bug filed as rdar://21097259.
Swift SVN r29008
2015-05-25 18:38:28 +00:00
Dave Abrahams
abf8e2f921
[stdlib] ~>_copyToNativeArrayBuffer() => method
...
Swift SVN r29001
2015-05-25 03:28:54 +00:00
Dmitri Hrybenko
55bb9a806b
stdlib: replace implementations of unavailable functions with fatalError()
...
Reduces the stdandard library dylib size by 10 Kb for each slice.
Swift SVN r28884
2015-05-21 20:22:13 +00:00
Dmitri Hrybenko
fe239e3d03
stdlib: de-underscore sort() and partition() methods
...
Swift SVN r28839
2015-05-20 19:34:36 +00:00
Dmitri Hrybenko
53f3ccf850
stdlib: change CollectionType.count() into a property
...
Swift SVN r28829
2015-05-20 09:14:43 +00:00
Dmitri Hrybenko
47595ee1db
stdlib: change sort() and sorted() into protocol extensions
...
Swift SVN r28736
2015-05-19 01:55:29 +00:00
Dmitri Hrybenko
17cafb6b3a
Revert "stdlib: don't use doc comment markup for non-doc comments"
...
This reverts commit 28724. It contains unintended changes.
Swift SVN r28725
2015-05-18 21:51:53 +00:00
Dmitri Hrybenko
e964eb7384
stdlib: don't use doc comment markup for non-doc comments
...
rdar://problem/20976063
Swift SVN r28724
2015-05-18 21:50:24 +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
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
843d8a4eb7
stdlib: protocol extensions: de-underscore map()
...
Swift SVN r28502
2015-05-13 01:58:46 +00:00
Dmitri Hrybenko
efed32e6bc
stdlib: indent doc comment per coding style
...
Swift SVN r28496
2015-05-12 23:17:51 +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
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
f8e5d28465
[stdlib] Remove needless "let"s
...
Simpler is better.
Swift SVN r28434
2015-05-11 19:34:26 +00:00
Dave Abrahams
918b323565
[stdlib] Suppress some new warnings
...
Swift SVN r28420
2015-05-11 16:18:55 +00:00
Chris Lattner
c1df892d47
improve stdlib hygiene a bit.
...
Swift SVN r28392
2015-05-10 02:55:18 +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
Dmitri Hrybenko
f46f16ae82
stdlib: implement new print() API
...
rdar://20775683
Swift SVN r28309
2015-05-08 01:37:59 +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
58601fafc8
Remove Array.count, it is redundant with protocol extensions
...
Swift SVN r28247
2015-05-07 00:30:41 +00:00