Commit Graph

7767 Commits

Author SHA1 Message Date
Ben Cohen
a2a3e1d706 numbered FIXME #165: _RangeReplaceableIndexable should be RangeReplaceableCollection 2016-10-05 17:56:15 -07:00
Ben Cohen
24dc2af4a9 supress unused loop counter warning (#5134) 2016-10-05 17:02:34 -07:00
Max Moiseev
99837a47a5 Merge branch 'master' into new-integer-protocols 2016-10-05 15:26:37 -07:00
Max Moiseev
08cf1de65a [WIP] fixing some of the integer related test failures 2016-10-05 15:25:23 -07:00
Max Moiseev
530e97ef2a Merge branch 'new-integer-protocols' of github.com:apple/swift into new-integer-protocols 2016-10-05 15:24:08 -07:00
Nate Cook
68a307ed96 [stdlib] Revise documentation for integer types & protocols (#5083)
* [stdlib] Revise documentation for integer types & protocols

* Update with feedback

* [stdlib] Additional integer documentation revisions
2016-10-05 15:22:57 -07:00
Andrew Trick
d5642f731b Add descriptive doc comments to withMemoryRebound(to:capacity:_:) and… (#5072)
* Add descriptive doc comments to withMemoryRebound(to:capacity:_:) and bindMemory(to:capacity:).

SR-2480: Improve documentation for withMemoryRebound(to:capacity:_:)
rdar://problem/28440528

* Nate's feedback
2016-10-05 12:44:47 -07:00
Ankit Aggarwal
e7a6ce07ab [GlibcModuleMap] Add sys/file.h to glibc modulemap 2016-10-05 12:35:47 +05:30
Tony Parker
15d5875bf3 Fix quarantineProperty in URLResourceValues
NSURL has an odd behavior around the quarantine dictionary URL resource
value - if you want to clear it, you should pass NSNull instead of the
NSDictionary. We need to accomodate that in the overlay code with a
special case.

<rdar://problem/28575806> Cannot remove Quarantine attribute in Swift 3
2016-10-04 15:58:57 -07:00
Tony Parker
bc9bf82118 Merge pull request #5109 from parkera/parkera/fix_locale_comments
Fix a few documentation errors in struct Locale
2016-10-04 11:34:10 -07:00
K Staring
ede70f2513 rolled back FreeBSD /proc changes and rewrote as per @landonf suggestion, through sysctl() call. Kept the function as similar to the other functions as possible. 2016-10-04 08:47:26 +02:00
Michael Gottesman
87329bfbdd Merge pull request #5107 from modocache/swiftshims-clang-header-locations
[SwiftShims] Improve CMake Clang headers error
2016-10-03 19:38:53 -07:00
Tony Parker
1a08dc87a3 Fix a few documentation errors in struct Locale 2016-10-03 15:51:44 -07:00
Brian Gesiak
a6a072f38f [SwiftShims] Improve CMake Clang headers error
When Clang headers could not be found, print all the locations that
were searched.
2016-10-03 17:34:33 -04:00
Philippe Hausler
2ffc3d52f2 [Foundation] Extract NSURL extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
b9da412ddd [Foundation] Extract NSDate extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
da84c29707 [Foundation] Extract NSCoder/NSKeyed(Un)Archiver extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
d1ebf836c9 [Foundation] Extract NSUndoManager extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
1050bc4f1d [Foundation] Extract NSExpression extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
16dce5a76f [Foundation] Extract NSPredicate extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
ae45b2daac [Foundation] Extract NSError extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
c3f87ce097 [Foundation] Extract geometry extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
8017c7abc0 [Foundation] Extract NSRange extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
91f3bb4f55 [Foundation] Extract NSIndexSet extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
cb5b894ac0 [Foundation] Extract NSEnumerator/NSFastEnumeration extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
3522fa8f6e [Foundation] Extract NSSet extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
574f1d068c [Foundation] Extract NSTextCheckingResult extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
c3bcd0dc18 [Foundation] Extract NSDictionary extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
5d28920d8e [Foundation] Extract NSArray extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
4ce31cc7c0 [Foundation] Extract NSNumber extensions into a seperate file
Non functional change; purely organization/gardening (this also extracts the gyb requirement from Foundation.swift)
2016-10-03 12:37:25 -07:00
Philippe Hausler
a1fd6ee38b [Foundation] Extract String extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
7dc60d535a [Foundation] Extract NSString extensions into a seperate file
Non functional change; purely organization/gardening
2016-10-03 12:37:25 -07:00
Philippe Hausler
4e843ff20c [Foundation] Sort the cmake build list for the Foundation overlay 2016-10-03 12:37:25 -07:00
Brian Gesiak
49248a44c2 [stubs] Prevent CMake from linking with object lib
Attempting to link against an object library results in a CMake error.
Prevent such an error by removing a line I mistakenly added in b86125ac.
2016-10-02 19:51:45 -04:00
Slava Pestov
fab574c3a7 stdlib: Add some @_versioned declarations to fix resilient build
A recent change made accessibility checking stricter. This had some
fallout on the half-baked @_versioned attribute, where we could no
longer define @_versioned members on a non-@_versioned type.

This was wrong anyway (and will be diagnosed when we add proper
diagnostics for @_versioned), because type metadata for the
internal type did not get the right linkage, but it used to work
as long as you didn't try to get the type metadata at runtime.

This patch adds @_versioned attributes to the right types now that
this broken behavior is gone.

As a result, _Variant{Set,Dictionary}Storage became resilient
(non-@_versioned internal types are not resilient), which broke
too many tests that assumed you can exhaustively switch over all
the cases. Since eager-bridging is going to eliminate this enum
anyway (or so I've heard), make it @_fixed_layout for now.
2016-09-30 18:28:11 -07:00
Slava Pestov
53b3a69a9a Runtime: Fix dynamic casts to support resilient protocols
If a protocol witness table requires instantiation, the runtime
needs to call the witness table accessor when looking up the
conformance in swift_conformsToProtocol().

We had a bit of code for this already, but it wasn't fully
hooked up. Change IRGen to emit a reference to the witness table
accessor rather than the witness table itself if the witness
table needs instantiation, and add support to the runtime for
calling the accessor.
2016-09-30 18:28:11 -07:00
Max Moiseev
17b3e38497 Merge branch 'master' into new-integer-protocols 2016-09-30 15:14:55 -07:00
Michael Gottesman
581f1b0141 Merge pull request #5003 from modocache/stdlib-runtime-cmake-target-sdks
[runtime] Update CMake to use TARGET_SDKS (NFC)
2016-09-29 20:08:27 -07:00
Max Moiseev
e0b8532204 introducing concrete initializers from all floating point types 2016-09-29 16:35:42 -07:00
Doug Coleman
0903ecf6ac os overlay: Fix XPC dependencies. Hopefully the last change with this
issue for awhile.
2016-09-29 14:00:53 -07:00
Brian Gesiak
7fbf5014f0 Merge pull request #4999 from modocache/cmake-in-list
[cmake] Enable IN_LIST compare policy
2016-09-29 15:45:01 -04:00
Jordan Rose
b3a9ce60ef Add manual dependencies not found by find-overlay-dependencies.sh.
rdar://problem/28543423
2016-09-29 11:34:51 -07:00
Maxim Moiseev
783b1de217 [Foundation] Extracting the ReferenceConvertible conformance for CharacterSet (#5054) 2016-09-29 11:15:08 -07:00
K Staring
69085ae4eb Merge branch 'master' of https://github.com/apple/swift 2016-09-29 07:24:25 +02:00
K Staring
47b4c7ee78 fixed the pthread compilation errors by following Sangjin Han's advice,
see also Han's PR:  https://github.com/apple/swift/pull/3886/files#diff-99fd89ad44c4466de8ad6b8aab9c207d
2016-09-29 07:12:15 +02:00
Brian Gesiak
b86125accf [stubs] Update CMake to use TARGET_SDKS (NFC)
The `add_swift_library` CMake function takes an optional `TARGET_SDKS`
parameter. When used, only CMake targets for the specified SDKs are added.

Refactor `stdlib/public/stubs` to use this parameter. This also eliminates
logic that determines additional flags or source files to include based on
`SWIFT_HOST_VARIANT`, which makes it easier for hosts to add targets for
different platforms.
2016-09-28 22:41:15 -04:00
Brian Gesiak
3123b47602 [cmake] Enable IN_LIST compare policy
Enable CMake policy CMP0057, which allows `if()` statements to use the `IN_LIST`
operator. In addition, simplify several `if()` statements that used the
`list(FIND ...)` operation instead.
2016-09-28 22:35:05 -04:00
Arnold Schwaighofer
79cd81851c Merge pull request #5049 from aschwaighofer/fix_irgen_emitObjCMetadataRef
IRGen: emitObjCMetadataRef needs to handle weakly linked Objective C …
2016-09-28 16:48:02 -07:00
Arnold Schwaighofer
d3ef6f70f2 Runtime: Make swift_getObjCClassMetadata resilient against weakly linked classes
rdar://28203571
2016-09-28 14:45:39 -07:00
Chris B
3f0adbd6fd Merge pull request #5034 from llvm-beanz/fix-swiftshims-dependency
[CMake] Fix bad dependency in symlink_clang_headers
2016-09-28 13:34:06 -07:00