Commit Graph

4694 Commits

Author SHA1 Message Date
Doug Gregor
d92ae77076 Eliminate most remaining uses of _convertNSFooToFoo and _convertFooToNSFoo.
Generalized bridging has fully subsumed most of these. NSError is
still special, and _convertStringToNSString remains for the the
runtime's implementation of SwiftObject's -description method.
2016-03-18 11:42:00 -07:00
Dmitri Gribenko
ceae4de018 Merge pull request #1723 from natecook1000/nc-sort-dedeprecate
[stdlib] Remove unavailable annotation for MutableCollection.sort()
2016-03-18 00:45:32 -07:00
Dmitri Gribenko
afcf0e34e0 Merge pull request #1722 from harlanhaskins/stdlibunittest-formatting
[StdlibUnittest] Make output for expected crashes less fatalistic
2016-03-17 21:12:31 -07:00
Harlan Haskins
47541c92b4 [StdlibUnittest] Made output for expected crashes less fatalistic 2016-03-17 18:23:41 -06:00
Joe Groff
36cf02597a Merge pull request #1720 from compnerd/underscore
runtime: improve portability and simplify aliases
2016-03-17 14:55:04 -07:00
Harlan Haskins
424eec9960 [StdlibUnitTest] Disable printing child stderr for expected crashes. 2016-03-17 15:14:05 -06:00
Nate Cook
afac511c19 [stdlib] Remove unavailable annotation for MutableCollection.sort() 2016-03-17 16:12:37 -05:00
Max Moiseev
03cbb49982 [stdlib] _stdlibAssert => _debugPrecondition 2016-03-17 12:16:19 -07:00
Saleem Abdulrasool
13a2ef3b4b runtime: improve portability and simplify aliases
clang and gcc provide a preprocessor macro called `__USER_LABEL_PREFIX__` which
provides the user label prefix for the specific target that the translation unit
is being built for.  Rather than trying to reconstruct the logic in place via
various checks, fallback to the compiler to provide this information.  Although
this limits the compilers (MSVC does not provide this preprocessor macro
definition), the only supported compiler ATM is clang, and it has provided this
definition for some time now.

This addresses the FIXME that was associated with the user label prefix being
applied under specific cases.

NFC.
2016-03-17 10:05:07 -07:00
rintaro ishizaki
d16de996c7 [Darwin] simplify ilogb implementation in tgmath 2016-03-17 13:28:13 +09:00
Brian Gesiak
38ceced779 Merge pull request #1704 from modocache/unrevert-target-specific-glibc
[Un-revert][Glibc] Configure modulemap for target, not host
2016-03-16 19:25:37 -04:00
Patrick Pijnappel
0a2804d3ba [stdlib] Fix a/an in comment 2016-03-17 06:15:29 +11:00
Patrick Pijnappel
77b4d73560 [stdlib] Replace stray usages of generator by iterator 2016-03-17 06:07:20 +11:00
Brian Gesiak
c6121d56b1 [Un-revert][Glibc] Configure modulemap for target, not host
This reverts commit f2154ee94d, which reverted 04e1cd5bda. The original
commit needed to be reverted because of an issue in which install
targets were added to OS X builds that did not target Linux. This
addresses that issue by guarding all the Linux-only CMake logic with a
check for the SDK being built.
2016-03-16 14:55:33 -04:00
Michael Ilseman
f2154ee94d Revert "[Glibc] Configure modulemap for target, not host" 2016-03-16 09:47:52 -07:00
Ted Kremenek
149fd438a1 Merge pull request #1631 from froody/uint64
[stdlib] Fix type of _swift_stdlib_HashingDetail_fixedSeedOverride
2016-03-16 00:13:34 -07:00
Brian Gesiak
5e24af7fba Merge pull request #1679 from modocache/target-specific-glibc
[Glibc] Configure modulemap for target, not host
2016-03-16 01:08:16 -04:00
Xi Ge
a9727dbace ModuleGroup: Add several subgroups. 2016-03-15 17:00:00 -07:00
Doug Gregor
03871e27ea Add missing CMake dependency HomeKit overlay -> UIKit overlay 2016-03-15 15:46:31 -07:00
Doug Gregor
1d90b044fb Really reinstate "[SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit 052d2d0a69.

The only actual issue with the original change was a missing change to
the UIApplicationMain SILGen test, which needs to build SILGen
overlays to execute properly; -enable-source-import doesn't suffice.
2016-03-15 15:44:07 -07:00
Brian Gesiak
04e1cd5bda [Glibc] Configure modulemap for target, not host
The current Glibc CMakeLists.txt uses the host machine to determine
which modulemap to use. The same modulemap can't be used for all
platforms because headers are available in different locations on
different platforms.

Using the host machine to determine which modulemap to configure and
place at a specific path in the resource dir is fine, so long as:

1. Only one Glibc is being compiled in a single CMake invocation.
2. The target machine needs the same modulemap as the host.

https://github.com/apple/swift/pull/1442 violates both of these
assumptions: the Glibc module for both Linux and Android is compiled
at the same time, and the Android target can't use the Linux modulemap.

This commit instead uses the target(s) to determine which
modulemap to use. The modulemap is configured and placed in an OS-
and architecture-specific directory in the resource dir. The path to
that modulemap is referenced by the ClangImporter (since it is no
longer at a path that is automatically discovered as an implicit
modulemap).
2016-03-15 18:40:17 -04:00
Doug Gregor
052d2d0a69 Revert "Reinstate [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit b25019c259. The
builders are failing in ways that are clearly related to my changes
but I'm unable to replicate locally.
2016-03-15 15:00:31 -07:00
Erik Eckstein
e1b94885a2 runtime: add a new runtime function swift_setDeallocating.
It's to be used by code produced by the ReleaseDevirtualizer.
As the function is only used for non-escaping objects, the deallocating bit is set non-atomically.
2016-03-15 12:56:54 -07:00
Doug Gregor
b25019c259 Reinstate [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable.
This reverts commit 01fe7e4848.
2016-03-15 11:38:06 -07:00
Doug Gregor
01fe7e4848 Revert "[SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable."
This reverts commit aa9cc23743.
2016-03-15 06:52:27 -07:00
Doug Gregor
efede5c1c5 Revert "[SILGen] Enable protocol extension version of _unconditionallyBridgeToObjectiveC"
This reverts commit 16a5e044d9.
2016-03-15 06:51:59 -07:00
Ted Kremenek
2ded9fe444 Merge pull request #1466 from tinysun212/pr-common-inspect-dylib
Refactor code duplication in inspecting dylibs
2016-03-14 21:12:54 -07:00
Doug Gregor
16a5e044d9 [SILGen] Enable protocol extension version of _unconditionallyBridgeToObjectiveC 2016-03-14 15:45:31 -07:00
Doug Gregor
aa9cc23743 [SILGen] Implement NSString -> String bridging through _ObjectiveCBridgeable.
Introduce a new entrypoint to _ObjectiveCBridgeable,
_unconditionallyBridgeFromObjectiveC, which handles unconditional
bridging from an optional Objective-C object (e.g., an NSString) to
its bridged Swift type. Use it in SILGen to perform NSString -> String
bridging rather than the custom entry point.

Another small step toward generalized bridging.
2016-03-14 11:17:46 -07:00
practicalswift
6571f8bbb9 Merge pull request #1656 from practicalswift/remove-unused-functions-in-floatingpoint-swift-gyb
[Python] Remove unused functions in FloatingPoint.swift.gyb
2016-03-13 00:16:03 +01:00
practicalswift
a773051b2b [gardening] Fix recently introduced typo: "peoperty" → "property" 2016-03-12 21:15:30 +01:00
practicalswift
1b232e9b71 [Python] Remove unused functions in FloatingPoint.swift.gyb
Removed:
* getExponentBitCount(bits)
* getSignalingNanBitPattern(bits)
* llvmIntrinsicSuffix(bits)
2016-03-12 20:45:08 +01:00
Chris Lattner
97d8f50af4 Merge pull request #1537 from dduan/SE-0040-pr
[SE-0040] Replace '=' with ':' before attribute argument.
2016-03-11 20:51:26 -08:00
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Dmitri Gribenko
d06b375303 stdlib: unhide important underscored protocols in the generated interface 2016-03-11 09:47:16 -08:00
Dmitri Gribenko
bd42fbfdde Merge pull request #1591 from apple/revert-1590-revert-1569-noescape-encode
[stdlib] Add @noescape to output parameter of UnicodeCodecType.encode
2016-03-11 09:34:26 -08:00
practicalswift
11dba6f361 [gardening] Fix recently introduced typo: "acccessing" → "accessing"
[gardening] Fix recently introduced typo: "definately" → "definitely"
2016-03-11 16:03:06 +01:00
practicalswift
24ac89c697 [gardening] Fix formatting for some recently introduced file headers 2016-03-11 07:30:46 +01:00
Peter Cooper
7ec0e7348f Add more calls to the objc runtime for getting an object’s ISA.
Be more conservative in terms of masking ISAs.  This reduces tight coupling with the objc runtime.  This commit adds the required calls to IRGen and the runtime, and a test case to make sure IRGen is correct.
2016-03-10 15:07:20 -08:00
Tom Birch
d645a1a3e2 [stdlib] Fix type of _swift_stdlib_HashingDetail_fixedSeedOverride
GlobalObjects.h declares it as __swift_uint64_t, but GlobalObjects.cpp declared
it as uint64_t. The types should match exactly.
2016-03-10 14:30:13 -08:00
practicalswift
5b028d0651 [gardening] Fix recently introduced typo: " " → " "
[gardening] Fix recently introduced typo: "a initializer" → "an initializer"
[gardening] Fix recently introduced typo: "charaters" → "characters"
[gardening] Fix recently introduced typo: "fullfilled" → "fulfilled"
[gardening] Fix recently introduced typo: "initalizer" → "initializer"
[gardening] Fix recently introduced typo: "peoperty" → "property"
[gardening] Fix recently introduced typo: "reparing" → "repairing"
[gardening] Fix recently introduced typo: "spilt" → "split"
2016-03-10 11:52:02 +01:00
Rintaro Ishizaki
8891eb638b [stdlib] Add @noescape to output parameter of UnicodeCodecType.encode
Conformance:
 - UTF8.encode
 - UTF16.encode
 - UTF32.encode

Related functions:
 - transcode
 - String._encode
 - _StringCore.encode
2016-03-09 22:10:04 -08:00
Dmitri Gribenko
00c5d6368e Port iOS and watchOS SDK overlays to the latest Clang importer rules 2016-03-09 18:58:13 -08:00
Max Moiseev
885b564bf5 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 17:16:37 -08:00
Xi Ge
94e999f312 ModuleGroup: Add several missing files to their groups. 2016-03-09 17:09:34 -08:00
Max Moiseev
bcc08b6c3c fixing availability attribute hint for joinWithSeparator 2016-03-09 17:38:31 -07:00
Max Moiseev
aacc0f8293 merging RangeReplaceableCollectionType into RangeReplaceableCollection 2016-03-09 16:17:00 -08:00
Max Moiseev
02006f20bc Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 16:05:03 -08:00
Arnold Schwaighofer
8df5ed5c53 Merge pull request #1599 from aschwaighofer/tune_withUnsafeMutableBufferPointer_for_inlining
Force inlining of Array.withUnsafeMutableBufferPointer
2016-03-09 13:36:48 -08:00
Dmitri Gribenko
2b342cdc19 Merge pull request #1568 from rintaro/simplify-transcode
[stdlib] Simplify transcode implementation
2016-03-09 13:05:05 -08:00