Dave Abrahams
f77d6d47a0
[stdlib] Quick fix
...
Missed updating Slice.swift in my last commit.
Swift SVN r29727
2015-06-26 01:36:45 +00:00
Dave Abrahams
8e0b5bd553
[stdlib] Cleanups based on commit-list feedback
...
Thanks, Dmitri!
Swift SVN r29724
2015-06-26 01:15:50 +00:00
Dave Abrahams
fefc726ed0
[stdlib] Use a clearer protocol conformance
...
...now that Doug heroically fixed rdar://21546738
Swift SVN r29722
2015-06-26 01:15:49 +00:00
Dave Abrahams
f646b7016a
[stdlib] Add missing parameter name
...
Swift SVN r29721
2015-06-26 01:15:48 +00:00
Dave Abrahams
d73cbf525b
[stdlib] Add missing comments
...
Swift SVN r29720
2015-06-26 01:15:48 +00:00
Dave Abrahams
68dc42f350
[stdlib] Move IndexingGenerator for readability.
...
Swift SVN r29719
2015-06-26 01:15:47 +00:00
Dave Abrahams
65179cf143
[stdlib] Add missing comment.
...
Swift SVN r29718
2015-06-26 01:15:46 +00:00
Joe Groff
8ec59e5c11
Runtime: Implementation for generic typed boxes.
...
Provide new swift_{alloc,dealloc,project}Box2 entry points that allocate, project, and deallocate typed boxes using runtime-instantiated metadata. Give these a new metadata kind, so that external tools recognize the difference and can interpret the metadata appropriately.
Swift SVN r29714
2015-06-26 00:06:17 +00:00
Joe Groff
4a3f39761c
Runtime: Suppress warnings about extern "C" symbols with C-incompatible types.
...
These are a necessary evil until we get __attribute__((swiftcall)) or something like it in Clang. (Or rewrite the runtime in Swift.)
Swift SVN r29713
2015-06-25 23:56:52 +00:00
Dave Abrahams
1c5f805074
[stdlib] Protocol Extension-ize CollectionType
...
Eliminates _CollectionDefaultsType and _CollectionGeneratorDefaultsType
and creates sanity that should allow us to Protocol Extension-ize the
lazy operations, which have been blocked on inscrutable errors due in
part to the existing complexity.
Note: names beginning with "_prext_" are intended to be public after API
review and removal of the "_prext_" prefix.
Swift SVN r29689
2015-06-25 21:34:28 +00:00
Dave Abrahams
79bd9b3e7e
[stdlib] Move "first" _CollectionDefaultsType -> CollectionType
...
Swift SVN r29684
2015-06-25 21:34:22 +00:00
Devin Coughlin
cb85eac07e
WatchKit Overlay: Remove temporary hack to disable availability checking
...
Remove a temporary hack added in r29026 that disabled availability checking
for the WatchKit overlay due to SDK update issues. It is no longer needed.
rdar://problem/21099550
Swift SVN r29652
2015-06-25 01:56:58 +00:00
Dmitri Hrybenko
63fb583294
stdlib: fix coding style in Interval.swift.gyb
...
Swift SVN r29643
2015-06-24 20:42:10 +00:00
Dmitri Hrybenko
dc2f89fe44
stdlib: fix coding style in Unmanaged.swift
...
Swift SVN r29642
2015-06-24 20:42:10 +00:00
Dmitri Hrybenko
0d954c3b24
stdlib: rename the generic parameter from T to Instance on Unmanaged
...
Part of rdar://21429126
Swift SVN r29641
2015-06-24 20:42:09 +00:00
Dmitri Hrybenko
4e9b6b803d
stdlib: rename generic parameters from T to Bound on intervals
...
Changes HalfOpenInterval and ClosedInterval.
Part of rdar://21429126
Swift SVN r29640
2015-06-24 20:42:08 +00:00
Dmitri Hrybenko
4cdf37a68b
stdlib: rename the generic parameter from T to Element on unsafe pointers
...
Fixed AutoreleasingUnsafeMutablePointer, UnsafePointer,
UnsafeMutablePointer.
Part of rdar://21429126
Swift SVN r29637
2015-06-24 20:42:04 +00:00
Dmitri Hrybenko
ba208cd672
stdlib: rename zip generator and collection to a common naming convention
...
// Renamed from `ZipGenerator2`.
struct Zip2Generator<Generator1 : GeneratorType, Generator2 : GeneratorType> { ... }
// Renamed from `Zip2`.
struct Zip2Sequence<Sequence1 : SequenceType, Sequence2 : SequenceType> { ... }
Part of rdar://21429126
Swift SVN r29636
2015-06-24 20:42:03 +00:00
Dmitri Hrybenko
60ba7be3d1
stdlib: rename the generic parameter from T to Element on GeneratorSequence
...
Part of rdar://21429126
Swift SVN r29635
2015-06-24 20:42:02 +00:00
Dmitri Hrybenko
71022a46c1
stdlib: rename mapping sequence and collection wrappers to a common naming convention
...
struct ReverseIndex<Base : BidirectionalIndexType> { ... }
struct ReverseRandomAccessIndex<Base : RandomAccessIndexType> { ... }
// Renamed from `BidirectionalReverseView`.
struct ReverseCollection<Base : CollectionType where T.Index : BidirectionalIndexType> { ... }
// Renamed from `RandomAccessReverseView`.
struct ReverseRandomAccessCollection<Base : CollectionType where T.Index : RandomAccessIndexType> { ... }
Also fixed a bug (found by the new tests I added in this commit) in
LazyRandomAccessCollection.reverse(), which mistakenly returned a bidirectional
reversed collection.
Part of rdar://21429126
Swift SVN r29634
2015-06-24 20:42:01 +00:00
Dmitri Hrybenko
deac6d7020
stdlib: rename generic parameters from T to Element
...
... for LazySequence, LazyForwardCollection, LazyBidirectionalCollection,
LazyRandomAccessCollection.
Part of rdar://21429126
Swift SVN r29633
2015-06-24 20:42:01 +00:00
Dmitri Hrybenko
c2162f097f
stdlib: rename mapping sequence and collection wrappers to a common naming convention
...
// Renamed from `MapSequenceGenerator`.
struct MapGenerator<Base : GeneratorType, Element> { ... }
// Renamed from `MapSequenceView`.
struct MapSequence<Base : SequenceType, Element> { ... }
// Renamed from `MapCollectionView`.
struct MapCollection<Base : CollectionType, Element> { ... }
Part of rdar://21429126
Swift SVN r29632
2015-06-24 20:42:00 +00:00
Dmitri Hrybenko
6be11fe711
stdlib: rename filtering sequence and collection wrappers to a common naming convention
...
// Renamed from `FilterSequenceView`.
struct FilterSequence<Base : SequenceType> { ... }
// Renamed from `FilterCollectionViewIndex`.
struct FilterCollectionIndex<Base : CollectionType> { ... }
// Renamed from `FilterCollectionView`.
struct FilterCollection<Base : CollectionType> { ... }
Part of rdar://21429126
Swift SVN r29630
2015-06-24 20:41:59 +00:00
Dmitri Hrybenko
fdd73a57b4
stdlib: add tests for generic parameter names on EnumerateGenerator,
...
EnumerateSequence
Part of rdar://21429126
Swift SVN r29629
2015-06-24 20:41:58 +00:00
Dmitri Hrybenko
9dff1aa407
stdlib: rename generic parameters from T to Element
...
... for AnyGenerator, AnySequence, AnyForwardCollection,
AnyBidirectionalCollection, AnyRandomAccessCollection.
Part of rdar://21429126
Swift SVN r29628
2015-06-24 20:41:57 +00:00
Dmitri Hrybenko
bd9995782a
stdlib: rename generic parameters from T to Element
...
... for StrideToGenerator, StrideTo, StrideThroughGenerator, StrideThrough.
Part of rdar://21429126
Swift SVN r29627
2015-06-24 20:41:57 +00:00
Dmitri Hrybenko
5b8837fe1a
stdlib: change Range.{startIndex,endIndex} into stored properties
...
Previously, they were computed properties that just wrapped stored
properties. NFC.
Swift SVN r29626
2015-06-24 20:41:56 +00:00
Dmitri Hrybenko
585553ad04
stdlib: Range: remove declarations that can be inferred
...
Swift SVN r29625
2015-06-24 20:41:56 +00:00
Dmitri Hrybenko
f11f4946cb
stdlib: rename generic parameters from T to Element
...
... for Range and RangeGenerator.
Part of rdar://21429126
Swift SVN r29624
2015-06-24 20:41:55 +00:00
Dmitri Hrybenko
09ab3c17dc
stdlib: rename generic parameters from T to Element
...
... for UnsafeBufferPointerGenerator, UnsafeBufferPointer,
UnsafeMutableBufferPointer.
Part of rdar://21429126
Swift SVN r29623
2015-06-24 20:41:54 +00:00
Dmitri Hrybenko
d3dff3e3a5
stdlib: rename generic parameters from T to Element
...
... for EmptyGenerator and EmptyCollection.
Part of rdar://21429126
Swift SVN r29622
2015-06-24 20:41:53 +00:00
Dmitri Hrybenko
d013644588
stdlib: rename generic parameters from T to Element
...
... for GeneratorOfOne and CollectionOfOne.
Part of rdar://21429126
Swift SVN r29621
2015-06-24 20:41:52 +00:00
Dmitri Hrybenko
a884263c8a
stdlib: rename Repeat's generic parameter from T to Element
...
Part of rdar://21429126
Swift SVN r29620
2015-06-24 20:41:51 +00:00
Dmitri Hrybenko
d9726efbb2
stdlib: rename Set's generic parameter from T to Element
...
Same for SetGenerator and SetIndex.
Part of rdar://21429126
Swift SVN r29619
2015-06-24 20:41:51 +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
Dmitri Hrybenko
d396eb9772
stdlib: fix a spelling mistake in a doc comment
...
rdar://21496703
Swift SVN r29616
2015-06-24 20:41:44 +00:00
Dmitri Hrybenko
de937eb0d1
stdlib: add unavailable String.{count,subscript()} APIs
...
The doc comments on these APIs are meant to steer the users toward the
right API for the use case. Suggested by Anna Zaks.
Swift SVN r29615
2015-06-24 20:41:43 +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
Dmitri Hrybenko
30698410b1
SDK overlay: simplify implementations of unavailable functions
...
Swift SVN r29501
2015-06-19 01:04:06 +00:00
Dmitri Hrybenko
491e774f41
stdlib: redeclare requirements from underscored protocols in public protocols
...
... and remove the warning in comments that encouranged users to read
the declarations inside underscored protocols.
Swift SVN r29500
2015-06-19 01:04:05 +00:00
Dmitri Hrybenko
d46cb9db6e
Foundation overlay: remove initWithObjectsAndKeys:_,...
...
<rdar://problem/21384187> NSDictionary's convenience init(objects:
[AnyObject], forKeys keys: [AnyObject]) is unsound
This method is unsound / unsafe for Swift. There is not a way to
correctly express the alternating variadic type constant:
AnyObject, NSCopying,...
The overlay already defines a tuple based method that serves the same
role.
Patch by Michael J LeHew Jr.
Swift SVN r29497
2015-06-18 23:24:19 +00:00
Dave Abrahams
46e6f767c1
StdlibUnittest: debugDescription for MinimalSequence
...
Swift SVN r29478
2015-06-18 05:05:09 +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
John McCall
62fd20393c
Make _swift_allocNilObjCError public so that it can actually
...
be found by the runtime.
Fixes rdar://21184674, at least as long as your application
links against the Foundation overlay.
Swift SVN r29460
2015-06-17 22:17:49 +00:00
Jordan Rose
5bbc879dc8
Fix simd overlay after previous revert.
...
I guess I missed this configuration, sorry.
Swift SVN r29445
2015-06-17 05:19:54 +00:00
Jordan Rose
99768eb346
Revert "Switch overlays from using @exported to -import-underlying-module."
...
This reverts r29441 because it breaks the Linux build. I'll talk to Dmitri
about this tomorrow.
See rdar://problem/21254367
Swift SVN r29444
2015-06-17 05:02:21 +00:00
Jordan Rose
c8bfc87c4e
Switch overlays from using @exported to -import-underlying-module.
...
Some day we'll close the hole for @exported in the previous commit.
Swift SVN r29441
2015-06-17 04:48:06 +00:00
Jordan Rose
955e130536
Diagnose self-imports of the module being compiled.
...
The case where this comes up is when people name their app and framework
targets the same thing, or when they've renamed their test target module
in an attempt to avoid issues with NSClassFromString and differing
runtime names. We currently do various wrong things when this happens,
so just emit an error instead.
I left a hole for our overlays, which use '@exported import <the-current-module>'
to get at their Clang modules. The previous commit means this can be
replaced by -import-underlying-module, but that doesn't help our tests,
which use -enable-source-import for their overlays. Which we should stop doing.
rdar://problem/21254367
Swift SVN r29440
2015-06-17 04:48:01 +00:00