Commit Graph

3245 Commits

Author SHA1 Message Date
Arnold Schwaighofer
4739fab482 NSNumberBridging.swift stdlib tests also fail on armv7s
rdar://35814988
2017-12-04 08:06:26 -08:00
Karoy Lorentey
9fef06e59c Merge pull request #12752 from hamishknight/dictionary-subscript-addressor
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-12-04 15:04:29 +01:00
Ben Cohen
fde0d928eb Add conditional Lazy conformance to Slice when Base is Lazy (#13242) 2017-12-03 21:50:42 -08:00
Karoy Lorentey
a14664a306 Merge pull request #13162 from paulmenage/fix-integer-test
Fix typo in 32-bit portion of Integers test
2017-12-03 16:32:49 +01:00
Arnold Schwaighofer
d515d8ab4f TestNSNumberBridging.swift also fails on arm64
rdar://35814988
2017-12-02 09:43:39 -08:00
Arnold Schwaighofer
8ebbf68e30 Disable test that breaks on armv7
rdar://35814988
2017-12-02 09:32:18 -08:00
Greg Parker
da14cd79a6 [runtime] Clean up symbol exports in libc functions. (#13202) 2017-12-01 17:49:11 -08:00
Max Moiseev
156e6eb848 Exclude DoubleWidth due to the binary size concerns
<rdar://problem/32726173>
2017-12-01 14:29:53 -08:00
Nate Cook
956e793ef0 Improve consistency in NSNumber bridging
This makes sure casts of NaN succeed, and init(exactly: NaN) fails.
2017-12-01 13:44:33 -06:00
Nate Cook
45c4c47393 [stdlib] Make DoubleWidth conform to Unsigned/SignedInteger 2017-11-30 21:58:26 -06:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -08:00
Paul Menage
428d95b32c Fix typo in 32-bit portion of Integers test 2017-11-29 17:25:37 -08:00
Max Moiseev
66f8a9bbe0 Merge pull request #13007 from xwu/fused-multiply-add-stride
[stdlib] Eliminate intermediate rounding error in floating-point strides (and related gardening)
2017-11-29 11:35:14 -08:00
Doug Gregor
ba6f605d47 Fix some tests due to Equatable Optional/Array/Dictionary change. 2017-11-27 21:09:50 -08:00
Xiaodi Wu
d3fe5ac264 Support fused multiply-add and remove buggy Collection conformance in floating-point strides 2017-11-25 11:44:18 -06:00
Nate Cook
5dbfa2d947 Update tests for larger integer sizes 2017-11-24 23:06:12 -06:00
Hamish
79d8209ffa [stdlib] Use addressor for Dictionary's subscript(_:default:) 2017-11-19 15:45:27 +00:00
swift-ci
53ddcb5079 Merge pull request #13000 from gottesmm/pr-6a0399e1ebd7ccad1979a2af165d0b09595fb2cb 2017-11-18 20:55:27 -08:00
Michael Gottesman
89cefe0a70 [stdlib] Use a different access pattern to check uniqueness to work around more conservative SILGen codegen.
Using && here causes us to go down a SILGen path that guarantees that self will
be evaluated over the entire && expression instead of just the LHS. This cause
the uniqueness check to always return false at -Onone. At -O, the optimizer is
smart enough to remove this issue.

rdar://33358110
2017-11-18 20:16:28 -07:00
swift-ci
f6f58915b4 Merge pull request #13018 from bob-wilson/rdar35134245 2017-11-18 19:05:20 -08:00
ematejska
a00b0749c4 Merge pull request #12849 from rudkx/SE-0054
SE-0054: Rework diagnostics for IUOs and revise Swift 3 /4 semantics.
2017-11-18 18:51:39 -08:00
Bob Wilson
65f1324393 Update a test so that it is not broken by function merging.
Something has changed with newer versions of LLVM so that the
stdlib/SwiftObjectNSObject.swift test fails on the master-next branch
because the @objc thunk functions all get merged together. That is a good
thing for code size but it breaks some of the checks in this test that
compare the function pointers to verify that overrides are correct.
Make each function different so they cannot be merged.
2017-11-18 17:17:28 -08:00
taylor swift
c85880899d implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods 2017-11-17 21:28:03 -08:00
Doug Gregor
9f1cd0bf6b [Stdlib] Move _OptionalNilComparisonType operators into an extension on Optional.
Because global operators are “meh”.
2017-11-17 20:41:43 -08:00
Mark Lacey
8b55a0f61b SE-0054: Rework diagnostics for IUOs and revise Swift 3 /4 semantics.
For Swift 3 / 4:

Deprecate the spelling "ImplicitlyUnwrappedOptional", emitting a warning
and suggesting "!" in places where they are allowed according to
SE-0054.

In places where SE-0054 disallowed IUOs but we continued to accept them
in previous compilers, emit a warning suggesting "Optional" or "?"  as
an alternative depending on context and treat the IUO as an Optional,
noting this in the diagnostic.

For Swift 5:

Treat "ImplicitlyUnwrappedOptional" as an error, suggesting
"!" in places where they are allowed by SE-0054.

In places where SE-0054 disallowed IUOs, emit an error suggestion
"Optional" or "?" as an alternative depending on context.
2017-11-18 11:41:53 +09:00
eeckstein
73fc4b221b Merge pull request #12976 from eeckstein/remove-semantic
Remove @_semantics("optimize.sil.never")
2017-11-17 07:54:31 -08:00
Pavel Yaskevich
57ccdf7423 Merge pull request #12520 from xedin/remove-strideable
[stdlib] changes to remove `_Strideable` protocol.
2017-11-16 19:06:40 -08:00
Tony Parker
7b20be2c1c Merge pull request #12779 from parkera/parkera/json_key_strategy
Add key encoding strategy to JSONEncoder
2017-11-16 15:48:32 -08:00
Erik Eckstein
76f281510f Remove @_semantics("optimize.sil.never")
The replacement is @_optimize(none)
2017-11-16 14:11:52 -08:00
Pavel Yaskevich
98c6a7e127 [stdlib] Add + overload to LazyMapCollectionProtocol in Swift 3 mode
This overload is needed to re-enable Swift 3 source compatibility
related to a bugfix in ranking behavior of the constraint solver.
2017-11-16 13:38:24 -08:00
Pavel Yaskevich
7b121de1a0 [CSRanking] Change ranking to weight overload choices in evaluation order
Consider different overload choices for the same location in evaluation
order, this makes overload resolution more predictable because it's going
to follow expression bottom-up, that prevents situations when some
expressions are considered ambigious because choices taken further up
equate the score, instead each level is given distinct weight
based on evaluation order.

Resolves: rdar://problem/31888810
2017-11-16 13:38:24 -08:00
Tony Parker
b87a8ea007 Add key encoding strategy to JSONEncoder 2017-11-15 16:44:28 -08:00
Greg Parker
e8475cc130 Revert "Use conditional conformances to implement Equatable for Optional, Array and Dictionary" 2017-11-15 14:17:22 -08:00
Tony Parker
b57a9cb8a9 Merge pull request #12898 from sashabelonogov/sashabelonogov/SR-6361
[SR-6361] Fix Data.withUnsafeMutableBytes() for slices with length < range.lowerBound
2017-11-15 11:26:49 -08:00
Doug Gregor
4cc3447de8 Fix a test due to Equatable Optional/Array/Dictionary change. 2017-11-14 16:23:20 -08:00
Doug Gregor
1f9b28a117 [Type checker diags] Check generic arguments for any generic function.
This includes functions without type parameters that are generic
because they are members of a generic context. This addresses a
diagnostics regression because the '==' operators for Optional, Array,
and Dictionary were made into members.

The resulting error message is a little ugly, but is more informative
(and much shorter) than what we had before.
2017-11-14 16:23:20 -08:00
Max Moiseev
411054a1f9 [NFC][test] Add tests for all combinations of INSetProfileInCarIntent.init
<rdar://problem/33638857>
2017-11-14 11:52:39 -08:00
Alexander Belonogov
bf56b09395 [SR-6361] Fix Data.withUnsafeMutableBytes() for slices with length < range.lowerBound 2017-11-14 09:08:21 +01:00
Max Moiseev
759aad57c1 Merge pull request #12640 from moiseev/strides
[stdlib] Implement StrideTo and StrideThrough collections [WIP]
2017-11-13 14:15:09 -08:00
Itai Ferber
ae8f815f64 Use the concrete type parameter passed to JSON/plist decode 2017-11-09 13:06:00 -08:00
Max Moiseev
67763cd92d Mark Stride collections as internal while waiting for conditional conformances 2017-11-09 11:16:06 -08:00
Max Moiseev
a7d8a6a07c Fix the UnsafeRawBufferPointer test 2017-11-08 16:54:12 -08:00
Max Moiseev
e0ff7fe022 Merge pull request #12302 from moiseev/appkit-swift4
[overlay] Build AppKit overlay with Swift version 4
2017-11-08 11:48:40 -08:00
Greg Parker
9a38e609af [IRGen][runtime] Reduce object header to 8 bytes on 32-bit platforms. (#12790)
SR-4353, rdar://29765800
2017-11-08 02:50:11 -08:00
Greg Titus
20a488225a Merge pull request #12642 from gregomni/6204
[Sema] Don't suggest adding 'as' in a pattern matching context where it will do no good.
2017-11-07 10:02:58 -08:00
Max Moiseev
e1b83803d3 Add tests for StrideTo/StrideThrough collections 2017-11-06 15:59:04 -08:00
Max Moiseev
b49adc2398 Update UIKit
Changes simlar to those in AppKit.

<rdar://problem/34131288>
2017-11-06 15:52:52 -08:00
Max Moiseev
6cf8f9ba52 Extract operators into a protocol 2017-11-06 15:52:52 -08:00
Max Moiseev
e0f4985fbe Enable comparability and some numeric operations for specific wrapper types 2017-11-06 15:52:52 -08:00
Nate Cook
dcf6e2b409 [stdlib] Fix FloatingPoint.init(exactly:) (#12739)
* [stdlib] Fix FloatingPoint.init(exactly:)

This initializer wasn't actually checking the exact conversion.

SR-4634, rdar://problem/31836766
2017-11-06 15:24:44 -08:00