Commit Graph

4650 Commits

Author SHA1 Message Date
Dmitri Hrybenko
418f9b398c stdlib: remove bogus code that claims to be avoiding optimizations
Not only it does not achieve what the comment says (_storage has the
type _ContiguousArrayStorageBase), but optimizations that would break
semantics of this code would be invalid anyway.

Swift SVN r29056
2015-05-27 03:40:37 +00:00
Dmitri Hrybenko
6a975f2190 stdlib: remove dead code from ArrayBuffer
Swift SVN r29055
2015-05-27 03:40:36 +00:00
Dmitri Hrybenko
acdd8772be stdlib: update the doc comment to the new 'as!' syntax
Swift SVN r29054
2015-05-27 03:40:33 +00:00
Greg Parker
6c812d0751 [stdlib] Reinstate r29043 "strip final from protocol extensions".
This reverts r29050. This wasn't the change that broke the SourceKit tests.


Swift SVN r29052
2015-05-27 01:52:17 +00:00
Greg Parker
16a3b8ebd7 [stdlib] Revert "strip final from protocol extensions".
SourceKit tests need to be updated.


Swift SVN r29050
2015-05-27 01:34:45 +00:00
Dave Abrahams
1f1643221d [stdlib] strip final from protocol extensions
Now that we've lifted the requirement

Swift SVN r29043
2015-05-26 23:52:36 +00:00
Devin Coughlin
d6b3a2d75e WatchKit Overlay: Add availability and temporarily disable availability checking
The <Redacted>13A261 iOS SDK adds an availability attribute marking the imported
WatchKitErrorCode enum as available only on iOS 8.2 and newer. The WatchKit overlay
has a protocol extension for WatchKitErrorCode, so mark the extension as only available
on 8.2 and newer. On <Redacted>13A261 this silences a diagnostic complaining that
WatchKitErrorCode is only available on 8.2 and newer.

However, on <Redacted>13A254 this new annotation itself causes an error because on that
SDK WatchKitErrorCode claims to be available on all iOS versions and yet the conformance
would only hold on 8.2 and newer. To make this second diagnostic go away, this
commit temporarily disables availability checking for the WatchKit overlay.
rdar://problem/21099550 tracks re-enabling availability checking when we update the bots,
etc. to <Redacted>13A261.

rdar://problem/21098396

Swift SVN r29026
2015-05-26 05:47:56 +00:00
Dmitri Hrybenko
63c1b4d9e8 UIKit overlay: on watchOS, don't use unavailable types
Imitates the important effects of rdar://20989733

Swift SVN r29022
2015-05-26 04:24:18 +00:00
Dmitri Hrybenko
1058f68bc6 Foundation overlay: add overlays for new NSString APIs
rdar://20856757

Swift SVN r29019
2015-05-26 03:29:01 +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
Doug Gregor
7cc0e4b72c PassKit no longer needs to link against Contacts
Swift SVN r29005
2015-05-25 05:15:05 +00:00
Dave Abrahams
ed6c0dd49a [stdlib] ~>_distanceTo() => method
Swift SVN r29004
2015-05-25 04:59:04 +00:00
Doug Gregor
186fe53f74 Eliminate the NSError -> error enum bridging from Contacts.
CNErrorDomain is lacking proper availability annotations, and
explicitly linking with -weak_framework is not working reliably. For
now, just remove the overlay to solve rdar://problem/21030937. We'll
bring it back when rdar://problem/21032649 makes it into all of the
builds we care about.

Swift SVN r29003
2015-05-25 04:47:15 +00:00
Dave Abrahams
fbfa056dc4 [stdlib] ~>_initializeTo(ptr) => method
Swift SVN r29002
2015-05-25 03:46:49 +00:00
Dave Abrahams
abf8e2f921 [stdlib] ~>_copyToNativeArrayBuffer() => method
Swift SVN r29001
2015-05-25 03:28:54 +00:00
Enrico Granata
8a5726d966 Revert 28997
The consensus is against this change and we're going for a much more targeted fix in PlaygroundLogger only



Swift SVN r28999
2015-05-24 23:16:57 +00:00
Dave Abrahams
f1243f5f65 [stdlib] Pattern match Ranges efficiently again.
Fixes <rdar://21091371>.  When SequenceType acquired a O(N) 'contains'
method, the code for pattern matching a Range started using that method
instead of implicitly deducing a HalfOpenInterval.

We still have a problem though:

  (1_000_000..<1_000_000_000).contains(1)

will compile and appear to hang at runtime.  I'll bring this up on the
mailing list.

Swift SVN r28998
2015-05-24 22:43:40 +00:00
Enrico Granata
05a038e818 Make it so that the runtime demangler does not print the Swift standard library module name
This changes things like Swift.Dictionary<Swift.Int, Swift.AnyObject> to Dictionary<Int, AnyObject>

It has been suggested that playgrounds would benefit from not showing the fully qualified name.
Playgrounds use the runtime demangler to obtain type names, and honestly, I do not see enough value in those qualifiers being printed out to justify hackery in PlaygroundLogger or separate demangling logic



Swift SVN r28997
2015-05-24 22:25:12 +00:00
Ted Kremenek
a2c4ea971f Revert "Foundation overlay: add overlays for new NSString APIs"
Revert until our Jenkins devices support the underlying NSString API.  Keeping
this blocks iOS testing.

Swift SVN r28987
2015-05-24 16:55:25 +00:00
Dmitri Hrybenko
d45413efb8 Foundation overlay: add overlays for new NSString APIs
Swift SVN r28984
2015-05-24 10:39:21 +00:00
Dave Abrahams
0fdc73bf43 [stdlib] Minimize and rename _UnsignedIntegerType
The protocol is still needed in order to make sure mixed signed/unsigned
arithmetic doesn't compile, but after pulling all its "real"
requirements into UnsignedIntegerType, that's now its only function.
Thus, rename it to _DisallowMixedSignArithmetic.

Swift SVN r28980
2015-05-24 02:09:14 +00:00
Ted Kremenek
bc1500d50c Revert "[stdlib] Kill _UnsignedIntegerType"
This broke the bots.

Swift SVN r28976
2015-05-23 21:54:58 +00:00
Dave Abrahams
cda6cd207d [stdlib] Kill _UnsignedIntegerType
Swift SVN r28975
2015-05-23 21:14:14 +00:00
Dave Abrahams
924f5b9e00 [stdlib] Kill _Comparable
Swift SVN r28974
2015-05-23 20:46:21 +00:00
Dave Abrahams
7f8cea279b [stdlib] Kill _ExtensibleCollectionType
Swift SVN r28973
2015-05-23 20:36:30 +00:00
Dave Abrahams
1bcd3ff761 [stdlib] Kill _Sequence_Type
Swift SVN r28972
2015-05-23 20:22:56 +00:00
Dave Abrahams
f56efcbe67 [stdlib] Kill _RandomAccessIndexType
Swift SVN r28970
2015-05-23 18:52:24 +00:00
Dave Abrahams
4d4e62694f Kill _BidirectionalIndexType
Swift SVN r28968
2015-05-23 18:28:08 +00:00
Doug Gregor
6f4e8f47d3 Eliminate _MutableCollectionDefaultsType. NFC
Swift SVN r28952
2015-05-23 03:40:43 +00:00
Doug Gregor
79d7523b0e Eliminate _OutputStreamDefaultsType
Swift SVN r28951
2015-05-23 03:40:43 +00:00
Doug Gregor
24740be7d9 Eliminate _IncrementableDefaultsType, _BidirectionalIndexDefaultsType
Swift SVN r28950
2015-05-23 03:40:42 +00:00
Doug Gregor
1b0dbd0100 Fold the unnecessary _RangeReplaceableCollectionDefaultsType into RangeReplaceableCollectionType.
Swift SVN r28948
2015-05-23 03:40:39 +00:00
Doug Gregor
d1c25ddeb9 Add missing dependency: XCTest depends on AppKit or UIKit.
Swift SVN r28947
2015-05-23 03:40:35 +00:00
Dave Abrahams
efd287631f Kill _ForwardIndexType
Swift SVN r28933
2015-05-22 20:47:07 +00:00
Ted Kremenek
f750954a53 Make scalar arguments to SIMD vector initializers anonymous.
Patch by Steve Canon.

Swift SVN r28932
2015-05-22 20:39:28 +00:00
Joe Groff
72d82d1808 Darwin/Glibc overlays: Conditionalize SIG_* tokens.
Darwin libc and glibc use different typedefs for the signal handler type, and SIG_HOLD has different values. Conditionalize the definitions in their respective overlays.

Swift SVN r28921
2015-05-22 17:02:00 +00:00
Joe Groff
db13a714ba Darwin overlay: Add SIG_* constants.
Swift SVN r28919
2015-05-22 15:04:50 +00:00
Joe Groff
32fb006386 Clang Importer: Enable OptionSetType import.
Update the tests to match.

Swift SVN r28906
2015-05-22 05:47:37 +00:00
Joe Groff
d1b6fa32c4 Revert "Revert "[stdlib] Land OptionSetType et. al.""
This recommits r28892, r28894, and r28895; the previous commits should have addressed the previous breakage.

Swift SVN r28905
2015-05-22 05:47:29 +00:00
Dave Abrahams
7f60c226be Kill _SequenceDefaultsType
Swift SVN r28898
2015-05-22 00:54:22 +00:00
Dave Abrahams
21b9a97e88 Revert "[stdlib] Land OptionSetType et. al."
This reverts commit r28892, r28894, and r28895.

They broke validation tests; JoeG is going to look at what's needed to
make them work again.

Swift SVN r28897
2015-05-22 00:13:53 +00:00
Dave Abrahams
6e7d6b980b [stdlib] Eliminate OptionSetDispatchType
Iteration N+1 of the default implementations hack applied!
Also clean up the code voice in many comments.

Swift SVN r28895
2015-05-21 23:39:10 +00:00
Dave Abrahams
6fbb0cbcde Clean out a FIXME
It was in the wrong place w.r.t. gyb anyhow.  The radar remains.

Swift SVN r28894
2015-05-21 23:22:05 +00:00
Dmitri Hrybenko
d4baf3fadb stdlib: comments: Don't use markup in code listings in comments
Patch by Brian Lanier.

Swift SVN r28893
2015-05-21 23:17:37 +00:00
Dave Abrahams
ad7f7c6779 [stdlib] Land OptionSetType et. al.
This has passed review, or at least satisfied Tony Parker, provided we
do something to hide SetAlgebraDispatchType.  I think I can eliminate it
in an imminent commit.

Swift SVN r28892
2015-05-21 22:55:02 +00:00
Dmitri Hrybenko
28792f40b3 stdlib: add an API AnySequence.init(() -> Generator)
No objections on API review.

rdar://20720454

Swift SVN r28886
2015-05-21 20:56:38 +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
Slava Pestov
6bd9b399e9 stdlib: Tweak how empty enum cases are printed
Previously a mirror for an empty case would have one entry, consisting
of the case name and a value of ().

Now, the mirror's summary shows both the type and the case.  If there is
no payload, the mirror will not have any children. The presence of a
child indicates there is an actual payload.

Also put a non-ASCII character in the reflection test to ensure the
runtime's primitives can round-trip UTF8.

Fixes <rdar://problem/20994093>.

Swift SVN r28874
2015-05-21 16:01:47 +00:00
Dmitri Hrybenko
1519c85340 stdlib: annotate sort() method with @warn_unused_result
rdar://20775645

Swift SVN r28869
2015-05-21 06:27:27 +00:00