Philippe Hausler
c734324a67
[Foundation] Address a potential leak when writing a data to a URL and the file system representation fails ( #14176 )
2018-01-26 13:25:55 -08:00
Mishal Shah
fdbf76e9f5
Update master to build with Xcode 9.3 beta 1
2018-01-25 16:03:11 -08:00
Michael Gottesman
18bcc1e143
[+0-args] Change SWIFT_CC(Swift) functions to use SWIFT_NS_RELEASES_ARGUMENT instead of NS_RELEASES_ARGUMENT.
...
rdar://34222540
2018-01-23 16:01:27 -08:00
Greg Parker
7b9224794e
[runtime] Reinstate TwoWordPair hack for swiftcall returns. ( #14079 )
...
clang is miscompiling some swiftcall functions on armv7s.
Stop using swiftcall in some places until it is fixed.
Reverts c5bf2ec (#13299 ).
rdar://35973477
2018-01-23 01:04:01 -08:00
Karoy Lorentey
f2a96496a0
[StringGuts] Support for 32-bit platforms
...
Add 32-bit support to the new StringGuts.
2018-01-21 12:36:09 -08:00
Karoy Lorentey
3982875da0
Use Dictionary’s subscript setter rather than updateValue
...
It doesn’t matter which value we keep, and since we don’t currently check for duplicate values, there is no reason to retrieve the old value.
2018-01-20 00:58:44 +00:00
Karoy Lorentey
9e4dcd8bae
[Foundation] Coalesce duplicate keys in String-keyed NSDictionary and NSSet instances
...
NSString has a stricter concept of equality than Swift’s String, so it is possible to construct NSDictionary/NSSet instances that contain duplicate keys according to Swift’s definition of string equality. This change improves how we handle these cases by coalescing the duplicate keys (keeping a single value).
rdar://problem/35995647
2018-01-19 22:35:59 +00:00
Ben Cohen
ca6c6b1d36
[stdlib] Cleanup DefaultIndices, delete dead code ( #13952 )
...
* Remove a bunch of Default(Bidirectional|RandomAccess)Indices usage from stdlib and test
* Remove some DefaultRandomAccessIndices and IndexDistance usage from Foundation
* Remove no-longer-used internal type in Existentials.swift
* Get rid of indicesForTraversal
2018-01-15 13:48:08 -08:00
Itai Ferber
1e110b8f63
Restore decoder state after throwing on decode
...
Resolve SR-6408 by restoring the JSON/PlistDecoder stack if an error
is thrown after a container was pushed during encode.
2018-01-11 12:20:01 -08:00
Itai Ferber
57e356b1c4
Restore encoder state after throwing on encode
...
Resolve SR-6078 by restoring the JSON/PlistEncoder stack if an error
is thrown after a container was pushed during encode.
2018-01-11 12:20:01 -08:00
Gregory Todd Williams
09ed106f25
[stdlib] Don't try to construct invalid UnicodeScalars in CharacterSet
...
Inserting and removing a single Unicode.Scalar in a CharacterSet must not
attempt to create a Range<Unicode.Scalar> because the upperBound value might
not always be a valid UnicodeScalar.
This fixes a regression to the fix for SR-2988.
2018-01-02 10:07:28 -08:00
Maxim Moiseev
128092a7d6
Rename filterMap to compactMap
2017-12-18 09:22:41 -08:00
Max Moiseev
8ec6c45d2d
Use filterMap to avoid deprecation warnings
2017-12-18 09:16:37 -08:00
Max Moiseev
aa320815b5
[overlay] Add more explicit availabilities to BNNS
...
Fixes <rdar://problem/35914058>
2017-12-11 16:52:59 -08:00
swift-ci
5891a6d0f5
Merge pull request #13315 from ikesyo/os-macos
2017-12-08 13:43:26 -08:00
Thomas Roughton
c5bf2ec553
[runtime] Remove TwoWordPair and use the Swift calling convention instead. ( #13299 )
2017-12-07 19:27:24 -08:00
swift-ci
f767040b4a
Merge pull request #13316 from ikesyo/nsrange-init
2017-12-07 19:19:37 -08:00
Sho Ikeda
4438834529
Merge pull request #13266 from ikesyo/sync-measurement-overlay
...
[overlay] Synchronize Measurement.swift with swift-corelibs-foundation
2017-12-08 08:53:40 +09:00
Sho Ikeda
dacd46c95e
[overlay][gardening] Use NSRange.init over NSMakeRange
2017-12-07 22:03:14 +09:00
Sho Ikeda
ff5a27a62d
[overlay][gardening] Prefer os(macOS) over os(OSX)
2017-12-07 21:50:51 +09:00
Sho Ikeda
5682993d7c
[overlay][gardening] Use optional binding
2017-12-07 21:35:39 +09:00
Ben Cohen
85d190cd7d
[stdlib] Replace various uses of BlahSlice with Slice to reduce warnings ( #13263 )
...
* Kill the slice variants from the gybbed collection test types
* Handful more SDK instances
* Fix SequencesCollections.swift.gyb
2017-12-05 19:09:56 -08:00
Philippe Hausler
beffbc6ce5
[Foundation] Discontiguous data slices should not heap corrupt ( #13252 )
...
* [Foundation] Byte access and methods that funnel to byte access for slices of discontiguous data (ala backed by dispatch_data_t) should void heap corruption and walking off the ends of buffers
* add missing parens on test_byte_access_of_discontiguousData
* Use the proper byte count in testing
2017-12-05 09:55:22 -08:00
Sho Ikeda
c1f7e236d9
Synchronize Measurement.swift with swift-corelibs-foundation
2017-12-05 13:51:34 +09:00
swift-ci
6f19f4d1c3
Merge pull request #13189 from ikesyo/os-macos
2017-12-02 08:48:58 -08:00
Lance Parker
244a272500
Make Metal(Kit) overlays build in Swift 4 mode ( #13223 )
2017-12-02 07:38:46 -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
Sho Ikeda
e2b8bec138
[Overlay/Foundation][gardening] Prefer os(macOS) over os(OSX)
2017-12-01 09:00:49 +09:00
Jordan Rose
8f8f00012a
Merge pull request #12834 from jrose-apple/restrict-cross-module-struct-initializers-2
...
Implementation of SE-0189 "Restrict cross-module struct initializers to be delegating"
rdar://problem/34777878
2017-11-30 13:32:45 -08:00
Doug Gregor
208b2c180c
[XCTest overlay] Remove extraneous XCAssert(Not)Equal overloads.
...
XCTest had XCAssert(Not)Equal overloads for optionals, arrays
(including contiguous arrays and array slices), and dictionaries to
work around the lack of conditional conformances to Equatable. Now
that we have the latter, remove the former.
Fixes rdar://problem/17924430.
2017-11-27 21:09:50 -08:00
David Zarzycki
6a93b07cfb
NFC: Use standardized locale header
...
On Linux, glibc removed xlocale.h, which was non-standard.
2017-11-25 13:09:06 -05: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
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
Greg Parker
1e894cd80b
[runtime] Clean up symbols in error machinery. ( #12853 )
...
* [runtime] Clean up symbols in error machinery.
* [runtime] Clean up symbols in Foundation overlay.
* [runtime] Clean up symbols in collections and hashing.
* [runtime] Remove symbol controls from the Linux definition of swift_allocError.
* [tests] Add more stub functions for tests that link directly to the runtime.
2017-11-15 22:20:11 -08:00
Tony Parker
b87a8ea007
Add key encoding strategy to JSONEncoder
2017-11-15 16:44:28 -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
Alexander Belonogov
bf56b09395
[SR-6361] Fix Data.withUnsafeMutableBytes() for slices with length < range.lowerBound
2017-11-14 09:08:21 +01:00
Itai Ferber
ae8f815f64
Use the concrete type parameter passed to JSON/plist decode
2017-11-09 13:06:00 -08:00
Jordan Rose
1598a21e43
DI: Warn on non-delegating cross-module struct initializers
...
...as detected by initializing an individual field without having
initialized the whole object (via `self = value`).
This only applies in pre-Swift-5 mode because the next commit will
treat all cross-module struct initializers as delegating in Swift 5.
2017-11-09 11:24:28 -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
Max Moiseev
d4d89d1854
Use swift 4 with the AppKit overlay
2017-11-06 15:52:52 -08:00
Lance Parker
414614cf88
Revert "Revert "[stdlib]Enable Swift 4 mode for the overlays ( #12608 )"" ( #12751 )
...
This reverts commit bcf5d66c8e .
2017-11-06 14:03:48 -08:00
Mishal Shah
bcf5d66c8e
Revert "[stdlib]Enable Swift 4 mode for the overlays ( #12608 )"
...
This reverts commit f54d8b4ef2 .
2017-11-03 11:52:30 -07:00
Lance Parker
f54d8b4ef2
[stdlib]Enable Swift 4 mode for the overlays ( #12608 )
...
Enable Swift 4 mode for the overlays
2017-11-03 10:11:45 -07:00
Roman Levenstein
c3bc08ec06
Remove any mention of sil-serialize-all related flags from CMake files and build-script-impl
...
These flags are not needed anymore.
2017-10-21 19:18:15 -07:00
Roman Levenstein
5047e1b475
Enable the serialization of sil_vtables by default and completely remove the -sil-serialize-vtables option
...
Only sil_vtables of public classes with fixed layout are serialized.
2017-10-21 11:36:12 -07:00
Roman Levenstein
f2e8e0a448
Merge pull request #12493 from swiftix/sil-serialization-before-optimizations5
...
Enable serialization of witness tables by default
2017-10-21 08:40:59 -07:00
Roman Levenstein
48d9b99675
Remove -sil-serialize-witness-tables flag completely
...
The functionality is always enabled now and there is no need to have a dedicated flag for it.
2017-10-20 19:45:29 -07:00