Commit Graph

1358 Commits

Author SHA1 Message Date
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
Philippe Hausler
b78b438897 Ensure that hashing data with zero bytes avoids empty allocations and fix bridged empty data hashes from de-referencing null values (#12509) 2017-10-19 17:53:19 -07:00
Max Moiseev
88c544164f Merge pull request #12424 from moiseev/mtkmesh-fix
[overlay] Fix newMeshes to return proper modelIO meshes
2017-10-16 14:50:36 -07:00
Kim Topley
1da4b04d99 Fixes overflow trap when creating DispatchTime objects with large uptimeNanoseconds values and re-enables the tests that failed.
Adds some additional tests.
2017-10-16 07:09:05 -07:00
Max Moiseev
ed553fd257 [overlay] Fix newMeshes to return proper modelIO meshes
Fixes: <rdar://problem/34624659>
2017-10-13 10:48:11 -07:00
Roman Levenstein
9134153bd3 Stop using -sil-serialize-all when building the standard library
We can finally get rid of -sil-serialize-all when building the standard library! This option will be completely eliminated in the future commits.

Instead of serializing just everything as we did before, we now serialize only functions annotated with @_inlineable. This way we can selectively control what needs to be available to the clients. This is an important step towards building a resilient standard library.

While this is a huge change for the serialization of the stdlib, it should be virtually invisible to the clients. For example, there are no noticeable performance regressions on any of the benchmarks.
2017-10-02 14:34:14 -07:00
Doug Gregor
797df6e8d7 Eliminate the _*Indexable protocols.
The various _*Indexable protocols only exist to work around the lack of
recursive protocol constraints. Eliminate all of the *_Indexable protocols,
collapsing their requirements into the corresponding Collection protocol
(e.g., _MutableIndexable —> Collection).

This introduces a number of extraneous requirements into the various
Collection protocols to work around bugs in associated type
inference. Specifically, to work around the lack of "global" inference
of associated type witnesses. These hacks were implicitly present in
the *Indexable protocols; I've made marked them as ABI FIXMEs here so
we can remove them when associated type inference improves.

Fixes rdar://problem/21935030 and a number of ABI FIXMEs in the library.
2017-10-01 15:08:23 -07:00
Doug Gregor
42968b2069 Eliminate a number of uses of the *Indexable protocols. 2017-10-01 15:08:23 -07:00
Ross Bayer
fc9dcc09a9 Added in missing imports to Accelerate and CoreFoundation overlays. (#12167) 2017-09-28 15:45:52 -07:00
Max Moiseev
7322b63c44 [overlay] Fix Foundation extensions to Substring
When a substring gets bridged to NSString, it loses the initial offset,
therefore APIs that accept or return StringIndex ranges should handle
this case explicitly by adding/subtracting the substring start offset.

Fixes <rdar://problem/33873277>
2017-09-27 20:09:01 -07:00
Max Moiseev
962895b652 Merge pull request #11965 from moiseev/arkit+metal
[overlay] Add Metal, MetalKit overlays, and new APIs to ARKit
2017-09-22 11:44:18 -07:00
ktopley-apple
0dc62017a1 Merge pull request #11927 from ktopley-apple/dispatch-time-overflows
Fix overflow traps in DispatchTime/DispatchWallTime/DispatchTimeInterval
2017-09-20 13:27:35 -07:00