Commit Graph

361 Commits

Author SHA1 Message Date
Puyan Lotfi
dba135c8e2 Fixing SWIFT_COMPILE_FLAGS -parse-stdlib. 2019-06-27 16:02:25 -07:00
Karoy Lorentey
09c8997f94 [SDK] Regenerate overlay dependencies 2019-06-27 12:19:31 -07:00
Karoy Lorentey
22e0b4a2b8 [Foundation] Manually add CoreGraphics dependency
This isn’t hardcoded into the dependency detection script anymore.
2019-06-27 12:14:49 -07:00
Scott Perry
0fc5d6ad31 Performance improvements and availability updates for Collection.difference(from:using:) 2019-06-26 16:55:29 -07:00
Karoy Lorentey
2cc38fcace [Accelerate] Remove redundant @available attributes
Declarations lexically nested in a context with an @available declaration inherit the same.
2019-06-25 20:06:58 -07:00
Karoy Lorentey
992bed48e4 [Accelerate] Replace 9999 availability with actual OS versions 2019-06-25 20:03:28 -07:00
Karoy Lorentey
2fd8f54724 [Accelerate] vImage, vDSP, vForce: Describe availability 2019-06-25 19:59:27 -07:00
Xiaodi Wu
4555b287e8 [gardening] Update copyright year 2019-06-25 09:49:58 -04:00
Xiaodi Wu
6b5ee6d18c [NFC] Consolidate Decimal FloatingPoint implementations into one extension 2019-06-25 09:48:48 -04:00
Xiaodi Wu
ba34ee0a09 [NFC] Reorder Decimal protocol conformances to match documentation order; fix indentation 2019-06-25 09:17:48 -04:00
Xiaodi Wu
3104ccb12e Apply fix for SR-3126 and other changes to sync Decimal.init(_: Double) with sclf 2019-06-25 09:11:59 -04:00
Xiaodi Wu
fa0671c1af [NFC] Use sclf implementation of + - * / operators, move them and negate to SignedNumeric extension 2019-06-25 09:05:59 -04:00
Xiaodi Wu
742741f59b Note major divergences with sclf in implementation 2019-06-25 09:03:04 -04:00
Xiaodi Wu
e843bd303e [gardening] Sync formatting for constants with sclf version 2019-06-25 08:56:43 -04:00
Xiaodi Wu
b2ce4a2ba1 [Foundation] Fix two Decimal members with respect to NaN (#25698)
* Update Decimal.swift

Fix `Decimal.magnitude` so that `Decimal.nan.magnitude` is no longer incorrectly `0`.
Port changes from apple/swift-corelibs-foundation#1759, crucially correcting an error where `(0 as Decimal).doubleValue` returned `.nan`.

* [gardening] Zap indentation error

* Add test for `Decimal.nan.magnitude`

* Apply reviewer suggestion

Clean up `doubleValue`
2019-06-25 08:45:56 -04:00
Steven Brunwasser
3d6b52507f Focus on what to do and why to do it 2019-06-21 20:14:29 -07:00
Steven Brunwasser
fd8bd3645d Reword returns section without bullets 2019-06-21 19:49:13 -07:00
Steven Brunwasser
4d481a3dc2 Describe the behavior of value without mentioning its default value 2019-06-21 19:45:08 -07:00
Steven Brunwasser
3d9e292d31 Add reason why key can't be empty 2019-06-21 19:37:15 -07:00
Steven Brunwasser
b2737af5df key must not be the empty string 2019-06-21 19:29:57 -07:00
Steven Brunwasser
abc89e1cb1 Remove the default value from the parameter description
Default values are now automatically included documentation.
2019-06-21 19:18:31 -07:00
Steven Brunwasser
9552b3f64d Remove extra information from parameter description
This information belongs in the description. Having it both here and there is redundant.
2019-06-21 19:15:08 -07:00
Steven Brunwasser
da580345f2 Use more formal wording 2019-06-21 19:13:33 -07:00
Steven Brunwasser
2d9b52eec4 Use - note: syntax 2019-06-21 19:12:07 -07:00
Steven Brunwasser
7135b8969e Use headers that describe the section's purpose 2019-06-21 19:10:11 -07:00
Steven Brunwasser
e595b44a10 Fixed some grammar and changed some wording 2019-06-18 01:32:12 -07:00
Karoy Lorentey
194dba6c69 Merge pull request #25454 from lorentey/nsvalue-availability
[Foundation] Set correct availability on NSValue.value(of:)
2019-06-17 12:25:17 -07:00
Vlad Gorlov
6370681656 Android cross-compile on macOS: Fix for compile error addressed Float80 data type. (#25502)
* Fixes issue addressed Float80 data type. Float80 is disabled for Intel architectures (i.e. Android Simulator).

* More precise condition check.
2019-06-17 13:40:44 -04:00
Steven Brunwasser
8bb63c0c15 [Foundation]: Adding detailed documentation for NSLocalizedString 2019-06-15 14:50:03 -07:00
swift-ci
48e34070e6 Merge pull request #24904 from GeorgeLyon/master 2019-06-14 14:28:35 -07:00
Karoy Lorentey
8ae76342f8 [Foundation] Set correct availability on NSValue.value(of:)
(cherry picked from commit 35a47b3a55e113fd1212485b85d808427ccf5dea)
2019-06-13 20:10:06 -07:00
Harlan Haskins
f02bac341f Add new flag to XCTest overlay 2019-06-13 11:26:54 -07:00
Karoy Lorentey
6a2123fbb7 Merge pull request #25364 from lorentey/ModelIO-arrays
[SDK] Modernize array initialization pattern in ModelIO overlay
2019-06-12 11:28:15 -07:00
Karoy Lorentey
b4998fb9ff [SDK] Modernize array initialization pattern in ModelIO overlay
We have nondeterministic test failures indicating a memory safety issue in ModelIO’s overlay. This switches the overlay’s property implementations to use the new `Array(unsafeUninitializedCount:,initializedWith:)` initializer rather than the potentially unreliable `&values[0]` pattern.

rdar://problem/50449570
2019-06-11 15:18:44 -07:00
Slava Pestov
67fd1f2372 Foundation: Manually define hashValue witnesses for CocoaError, URLError, POSIXError and MachError 2019-06-11 14:26:21 -07:00
Slava Pestov
3491fecc04 Revert "Sema: Go back to synthesizing hashValue on _StoredBridgedNSError conformers"
This reverts commit 712927c494.
2019-06-11 14:22:48 -07:00
Karoy Lorentey
b48175525e Merge pull request #25345 from lorentey/foundation-diff-apis
[Foundation] Bridge difference APIs between Foundation and swift stdlib
2019-06-11 11:43:10 -07:00
Slava Pestov
712927c494 Sema: Go back to synthesizing hashValue on _StoredBridgedNSError conformers
Commit e0bba70 added a default implementation, however this is wrong
for non-imported types.

Instead, synthesize the body as before. Since this is one of the few
derived methods that can appear on an imported type, make sure to
build fully type-checked AST.

Fixes <rdar://problem/51322302>.
2019-06-11 02:46:10 -07:00
Karoy Lorentey
89b918a35a [Foundation] Temporarily revert to 9999 versions 2019-06-10 17:46:03 -07:00
Scott Perry
b10632811f [Foundation] Bridge difference APIs between Foundation and swift stdlib
rdar://problem/51604652
2019-06-10 17:45:54 -07:00
mishal_shah
1e38fc3030 Update master to build with Xcode 11 beta, macOS 10.15, iOS 13, tvOS 13, and watchOS 6 SDKs 2019-06-03 22:50:02 -07:00
Karoy Lorentey
fb55fc3be8 [redux][Foundation] Fix availability of NSValue.value(of:) (#25179)
* [Foundation] Fix availability of NSValue.value(of:)

(cherry picked from commit fbe5563d60)

* [Foundation] NSValue.value(of:): Reinstate runtime OS version check
2019-05-31 17:36:24 -07:00
Ben Cohen
e9d4687e31 De-underscore @frozen, apply it to structs (#24185)
* De-underscore @frozen for enums

* Add @frozen for structs, deprecate @_fixed_layout for them

* Switch usage from _fixed_layout to frozen
2019-05-30 17:55:37 -07:00
Itai Ferber
6171d68bfa Merge pull request #25065 from ikesyo/fix-dataprotocol-lastrange
Fix `DataProtocol.lastRange(of:)` (and cherry-pick Data.swift changes from swift-5.0-branch)
2019-05-28 09:54:16 -07:00
Sho Ikeda
44f0e93747 Merge pull request #25067 from ikesyo/avoid-fallthrough-where-appropriate
[gardening] Avoid fallthrough where appropriate (for readability/understandability)
2019-05-29 00:27:05 +09:00
Sho Ikeda
c1bb945124 [gardening] Avoid fallthrough where appropriate (for readability/understandability) 2019-05-26 09:50:02 +09:00
Sho Ikeda
a35c9f0c60 [gardening] Use Collection.isEmpty over Collection.count 2019-05-26 09:35:20 +09:00
swift-ci
b088acb66e Merge pull request #24767 from ikesyo/remove-unnecessary-breaks 2019-05-25 16:15:06 -07:00
Sho Ikeda
55b300f852 Fix DataProtocol.lastRange(of:) (and cherry-pick Data.swift changes from swift-5.0-branch)
`DataProtocol.lastRange(of:)` is correct in swift-5.0-branch, but not in master and swift-5.1-branch.
2019-05-26 07:26:33 +09:00
Shengqi Zhu
45112229b6 [Foundation]Fix newValue/oldValue in swift KVO when keyPath having a optional value
Fix https://bugs.swift.org/browse/SR-6066.
2019-05-23 23:32:42 +08:00