Commit Graph

1102 Commits

Author SHA1 Message Date
Arnold Schwaighofer
9fca4ccc37 Revert "Merge pull request #9057 from erg/overlay-deps-round5"
This reverts commit ea82bd19ec, reversing
changes made to ffdc8e15d9.

It broke the i386 build.
2017-04-27 07:23:08 -07:00
Maxim Moiseev
41b00c57ab Merge pull request #9044 from moiseev/substring-in
[stdlib] Substring
2017-04-26 19:25:59 -07:00
Doug Coleman
9a28931001 overlays: Update dependencies and amend the script to add headers. 2017-04-26 18:27:44 -07:00
Max Moiseev
457b8fcdb2 Substring conforms to _ObjectiveCBridgeable 2017-04-25 15:03:18 -07:00
Greg Parker
5eeb029371 [stdlib] sel_getName() never returns nil. 2017-04-25 13:09:48 -07:00
Maxim Moiseev
1c1b2b966d [stdlib] String : RangeReplaceableCollection & BidirectionalCollection (#8921)
* [stdlib] String : RangeReplaceableCollection & BidirectionalCollection

* Add source compatibility hack for Swift.max

* Add source compatibility hack for Swift.min

* Remove redundant conformance in benchmarks

* Fix stupid typo I thought I'd already pushed

* XFAIL testing now-redundant conformance

* XFAIL an IDE test for now
2017-04-23 20:04:54 -07:00
Andrew Bennett
ca31338e49 Simplifying implementation of ExpressibleByStringLiteral (#7125)
* Simplify conforming to ExpressibleByStringLiteral with default implementations

* attributes on default implementations

* ExpressibleByUnicodeScalarLiteral validation test

* more generic default implementations

* clean up test

* remove unneeded implementations

* remove test verification

* indent

* revert @effects and affected methods

* fix test generics with _ protocols

* Add semantic tests

* clean up tests

* Fix redundant conformance requirements
2017-04-21 20:45:28 -07:00
Maxim Moiseev
10da98abb9 Merge pull request #8851 from moiseev/integer-fixes
[stdlib] A few Swift 3 compatibility fixes
2017-04-20 10:45:02 -07:00
Philippe Hausler
c2d5ffda94 Merge pull request #8814 from phausler/faster_NSFastEnumerationIterator
[Foundation] Rework NSFastEnumerationIterator to be more performant
2017-04-18 12:25:28 -07:00
Max Moiseev
e15b7ccf5d [stdlib] Swift 3 compatibility methods on Decimal 2017-04-18 11:45:35 -07:00
Max Moiseev
8ca814cc8c Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-04-17 14:40:20 -07:00
swift-ci
c158056d1e Merge pull request #8559 from phausler/enumerate_bytes_index 2017-04-17 11:08:14 -07:00
Philippe Hausler
03dd527414 [Foundation] Rework NSFastEnumerationIterator to be more performant
Previously the implementation of NSFastEnumerationIterator would cause many allocations and was overly complex; leading to poor performance in certain cases like DirectoryEnumerator etc. This version instead acts more similarly to how the objc for-in syntax works.
Resolves:
rdar://problem/30905263

and partially addresses some of the concerns backing:
rdar://problem/30195113
2017-04-17 09:44:43 -07:00
Max Moiseev
8fe28b4e32 Merge branch 'master' into new-integer-protocols 2017-04-06 10:22:37 -07:00
Philippe Hausler
dad680f0b0 Merge pull request #8543 from phausler/data_subscript_ranges
[Foundation] Ensure data can be subscripted with all range types
2017-04-05 12:49:04 -07:00
Philippe Hausler
e422db587d [Foundation] Bridged dispatch_data_t to NSData to Data should enumerate bytes with the offset not the length parameter as the byte index 2017-04-05 10:31:43 -07:00
Philippe Hausler
32e461709e [Foundation] Ensure data can be subscripted with all range types 2017-04-05 08:56:07 -07:00
Max Moiseev
42095bfbaa Merge branch 'master' into new-integer-protocols 2017-04-04 11:00:47 -07:00
Doug Coleman
7054139c60 [cmake]: Be explicit about overlay platforms for compiling standalone.
The ALL_APPLE_PLATFORMS idiom is wrong because any new platforms that
get added will not have dependencies by default and it's breaking the
standalone overlay script for platforms that use it. Moreover, some of the
overlays list all platforms even though they could have used
ALL_APPLE_PLATFORMS.
2017-04-03 21:00:05 -07:00
Maxim Moiseev
0d521da5fe [overlay] Rename CocoaError.Code.serviceMiscellaneous to serviceMiscellaneousError (#8517)
Fixes: rdar://problem/31108956
2017-04-03 16:25:26 -07:00
Max Moiseev
10f0c9e89a Merge branch 'master' into new-integer-protocols 2017-04-03 11:49:56 -07:00
practicalswift
ca72b12287 [gardening] Remove accidental \t:s 2017-04-02 16:03:54 +02:00
Doug Gregor
86d8fa9e51 [ObjectiveC] Resolve warning about deprecated @objc inference 2017-03-31 21:53:58 -07:00
Doug Gregor
e5267f5d13 [SceneKit] Address deprecated @objc inference warnings. 2017-03-31 21:53:57 -07:00
Doug Gregor
7c7652f3fc [AppKit] Address deprecated @objc inference warnings. 2017-03-31 21:53:57 -07:00
Doug Gregor
e4e9a63298 [Foundation] Address deprecated @objc inference warnings.
Another 15 unnecessary Objective-C entry points eliminated.
2017-03-31 21:53:56 -07:00
Philippe Hausler
ef7026a23e Merge pull request #8283 from phausler/characterset_perf
[Foundation] Rework the backing storage for CharacterSet to be more performant and bridge correctly to objective-c and CF
2017-03-31 15:49:32 -07:00
Philippe Hausler
6c26b80e6e [Foundation] Rework the backing storage for CharacterSet to be more performant and bridge correctly to objective-c and CF
Some cases of using isSuperset can cause crashes, this was caused by improper subclassing callouts; this pr resolves those failures (and provides unit tests for that case)
The cases where the bridge was traversed too much now only causes a single bridge out call (without needing to reallocate or thrash retain/release)
String.components(separatedBy: CharacterSet) should be considerably faster now not only for more apporpriate bridging calls but also no longer needing to bridge arrays back and forth.

Resolves the following issues:
rdar://problem/17281998
rdar://problem/26611771
rdar://problem/29738989
2017-03-31 11:06:38 -07:00
Max Moiseev
2c9be47551 Merge branch 'master' into new-integer-protocols 2017-03-23 16:46:01 -07:00
Doug Gregor
27be8c7531 [Foundation] Eliminate redundant explicit requirements. 2017-03-22 17:35:15 -07:00
Doug Gregor
cedb22a10b [CoreData] Eliminate redundant explicit requirements 2017-03-22 17:35:14 -07:00
Max Moiseev
b9fb3badc8 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-03-22 12:30:24 -07:00
ktopley-apple
2e5e1d8ee5 Makes the DispatchIO initializer that accepts a path failable, reflecting the fact that a relative or non-existent path is invalid. (#8173)
(Radar 28564226)
2017-03-20 15:32:22 -07:00
eeckstein
996b618875 Merge pull request #8204 from eeckstein/rename-namespace
rename namespace NewMangling -> Mangle
2017-03-20 11:51:56 -07:00
Doug Coleman
3379be73da cmake: Run ./utils/find-overlay-dependencies-loop.sh on the overlays.
This should be automated, but be careful that platforms that go from
supported -> unsupported throw an error and do not autoupdate.
2017-03-20 10:32:24 -07:00
Erik Eckstein
d70bfc5de2 rename namespace NewMangling -> Mangle 2017-03-20 10:09:30 -07:00
Doug Gregor
45d6d7cab7 [Foundation] Eliminate redundant conformance requirement. 2017-03-17 21:52:47 -10:00
Doug Coleman
8c2bd5ae23 cmake: Initial standalone overlays builds.
./utils/build-overlay AVFoundation OSX macosx
rdar://problem/28707246
2017-03-14 12:51:42 -07:00
Jordan Rose
f12afd2ffa Merge pull request #8010 from KingOfBrian/bugfix/SR-1762-Remove-Final-In-Protocol-Extensions
Remove final in protocol extensions
2017-03-13 16:23:24 -07:00
Max Moiseev
7d73b2e1ca Arithmetic => Numeric 2017-03-13 11:50:02 -07:00
ktopley-apple
56081a24c3 Add support for UnsafeRawBufferPointer to DispatchData (#8004)
* Add support for UnsafeRawBufferPointer to DispatchData

(Radar 28503167)

* Review comments.
2017-03-10 13:59:44 -08:00
eeckstein
cc6045b45a Merge pull request #8006 from eeckstein/demangle-lib
demangler: put the demangler into a separate library
2017-03-09 16:40:35 -08:00
Philippe Hausler
ce3ccfbd9b Change shims to always be counted as system headers via -isystem instead of conditionally marking them in debug versus non debug builds. (#7979) 2017-03-09 16:09:16 -08:00
Erik Eckstein
5e80555c9b demangler: put the demangler into a separate library
Previously it was part of swiftBasic.

The demangler library does not depend on llvm (except some header-only utilities like StringRef). Putting it into its own library makes sure that no llvm stuff will be linked into clients which use the demangler library.

This change also contains other refactoring, like moving demangler code into different files. This makes it easier to remove the old demangler from the runtime library when we switch to the new symbol mangling.

Also in this commit: remove some unused API functions from the demangler Context.

fixes rdar://problem/30503344
2017-03-09 13:42:43 -08:00
Brian King
29c1fc472b Generate an error message on protocol extensions with the final attribute. 2017-03-09 14:18:39 -05:00
Joe Groff
294913e114 Fix _stdlib_getErrorDefaultUserInfo to have the signature the runtime expects.
The ABI mismatch here would cause a crash in cases when the Foundation overlay wasn't available, or its implementation of swift_Foundation_getErrorDefaultUserInfo wasn't dynamically resolvable, such as in a stripped statically linked binary. Fixes rdar://problem/29173132.
2017-03-08 14:56:02 -08:00
Max Moiseev
835b8809d2 Merge branch 'master' into new-integer-protocols 2017-03-07 16:18:54 -08:00
Philippe Hausler
dc783c064c [Foundation] Remove @_silgen thunks and replace them with shims instead
This avoids indirection by making calls directly to the C implementations which prevents potentials of mismatched intent or changes of calling convention of @_silgen. The added benefit is that all of the shims in this case are no longer visible symbols (anyone using them was not authorized out side of the Foundation overlay). Also the callout methods in the headers now all share similar naming shcemes for easier refactoring and searching in the style of __NS<class><action> style. The previous compiled C/Objective-C source files were built with MRR the new headers MUST be ARC by Swift import rules.

The one caveat is that certain functions MUST avoid the bridge case (since they are part of the bridging code-paths and that would incur a recursive potential) which have the types erased up to NSObject * via the macro NS_NON_BRIDGED.

The remaining @_silgen declarations are either swift functions exposed externally to the rest of Swift’s runtime or are included in NSNumber.gyb which the Foundation team has other plans for removing those @_silgen functions at a later date and Data.swift has one external function left with @_silgen which is blocked by a bug in the compiler which seems to improperly import that particular method as an inline c function.
2017-03-06 09:59:37 -08:00
Jordan Rose
51d0715434 [CMake] Update dependencies for CloudKit for Apple-internal configs. (#7693)
rdar://problem/30432611
2017-02-23 13:40:01 -08:00
swift-ci
6c981c8f64 Merge pull request #7432 from ktopley-apple/dispatch-after-mach 2017-02-21 13:21:38 -08:00