Commit Graph

10155 Commits

Author SHA1 Message Date
Karoy Lorentey
4c3c3355f0 Merge pull request #28685 from lorentey/i-heard-you-like-runtime-so-i-put-a-runtime-in-your-foundation-overlay-so-you-can-run-while-you-found
[Foundation][runtime] Remove swift_errorBridgingInfo
2019-12-11 10:54:40 -08:00
swift_jenkins
c62f3500d8 Merge remote-tracking branch 'origin/master' into master-next 2019-12-11 07:40:52 -08:00
Luciano Almeida
392baefc47 [stdlib][Qol] SR-11295 Removing stdlib unnecessary coercions (#27165)
* Removing unnecessary casts from stdlib

* Minor adjustments

* [stdlib][qol] Clean up error variable assign NSError

* Removing unnecessary coercions after removing DeclRefExpr restriction.
2019-12-11 07:30:25 -08:00
swift_jenkins
3140acc993 Merge remote-tracking branch 'origin/master' into master-next 2019-12-10 21:20:05 -08:00
Robert Widmann
43a3ab7e35 Merge pull request #28665 from CodaFi/the-phantom-menace
Explicitly State CodingKeys as a Codable Requirement
2019-12-10 21:06:01 -08:00
swift_jenkins
a80cdb4dcc Merge remote-tracking branch 'origin/master' into master-next 2019-12-10 18:00:31 -08:00
Karoy Lorentey
2e17867774 Merge pull request #28378 from JacobMao/fix/SR-11283
SR-11283: Amend OptionSet.remove method
2019-12-10 17:41:45 -08:00
Robert Widmann
3bda241b11 State CodingKeys as an explicit requirement
The presence of this attribute will be used to guide the protocol derivation machinery to synthesize CodingKeys.
2019-12-10 16:28:51 -08:00
Karoy Lorentey
c34389ce72 [Foundation][runtime] Remove swift_errorBridgingInfo
To implement swift_errorBridgingInfo, the Foundation overlay needs to import private runtime headers. Now that we cannot statically link the Foundation overlay, there is no point to keeping this workaround in the overlay any more.

This effectively reverts https://github.com/apple/swift/pull/16677.

rdar://problem/57809306
2019-12-10 15:33:24 -08:00
swift_jenkins
cce8830e9b Merge remote-tracking branch 'origin/master' into master-next 2019-12-10 15:20:30 -08:00
Joe Groff
f7caa2d618 Bump runtime to load backward compatibility hacks from __swift52_hooks 2019-12-10 13:10:08 -08:00
Joe Groff
fb34044408 Merge remote-tracking branch 'origin/master' into master-next 2019-12-10 12:46:41 -08:00
Azoy
e3a440186a Reorder conformances in cake test 2019-12-07 14:53:13 -05:00
Azoy
eebf8825f9 post de-gyb formatting 2019-12-07 11:05:45 -05:00
Azoy
0c4aa6055f de-gyb unavailablestringapis 2019-12-07 11:05:45 -05:00
Azoy
3f5c7162cc de-gyb runtime 2019-12-07 11:05:45 -05:00
Azoy
73250ad93a de-gyb mirrors 2019-12-07 11:05:45 -05:00
Azoy
48672551c9 de-gyb existentialcollection 2019-12-07 11:05:44 -05:00
Azoy
eb8bd16ca5 de-gyb codable 2019-12-07 11:05:44 -05:00
Azoy
5469cd2c62 de-gyb builtinmath 2019-12-07 11:05:44 -05:00
Robert Widmann
c93d5095fc Merge pull request #28619 from plotfi/master-dec6-1
[NFCi] Adding inttypes.h to Errors.cpp due to llvm.org change in STLExtras.h.
2019-12-06 17:56:50 -08:00
Butta
14cc620016 [android] A few tweaks for native compilation and to get more tests working
Now that CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME are set by default to
Android in the Termux app, make the needed tweaks. Some tests were adapted
to work natively on Android too, adds sys/cdefs.h to the Bionic modulemap,
and includes the start of native Android platform support in the build-script.
2019-12-07 01:01:59 +05:30
Puyan Lotfi
caf5af4027 [NFCi] Adding inttypes.h to Errors.cpp due to llvm.org change in STLExtras.h.
In Errors.cpp, PRIxPTR is used in a format string:

constexpr const char *format = "%-4u %-34s 0x%0.16" PRIxPTR " %s + %td\n";

This fails to build because of upstream changes in STLExtras:

049043b598 (diff-43fc25e3af55e1ae97f17ef051d68aa4)

This patch merely adds the include for the needed PRIxPTR define.

(cherry picked from commit 0529fbedca)
2019-12-06 14:28:36 -05:00
Varun Gandhi
affa1b49bf [Runtime] Memset Extradata fully before copy from pattern. (#28478)
The third argument of memset needs a size in *bytes* not words.
2019-12-04 08:48:01 -08:00
Robert Widmann
5725984dc6 Merge pull request #28462 from dtorres/patch-1
[LazyFilterSequence] Preserve order of predicates
2019-12-03 19:37:36 -08:00
Robert Widmann
9893ef575b Merge pull request #20481 from linux-on-ibm-z/swift4.2-s390x-ABIChanges
Towards s390x arch support - ConfigureSystemZ changes
2019-12-02 11:17:03 -08:00
swift-ci
4caf584406 Merge pull request #28436 from mikeash/better-metadata-generic-args-dumping 2019-12-02 11:16:43 -08:00
Saleem Abdulrasool
ff5741cec2 Merge pull request #28464 from compnerd/local-remote
build: separate out host build of SwiftRemoteMirror
2019-12-02 09:02:22 -08:00
Erik Eckstein
3e932c075d stdlib: Add custom .first to Array
This makes Array.first much small and more efficient.
Without this, Array.first compiled down to RandomAccessCollection.first, which ended up in pretty unefficient code.

rdar://problem/46291397
2019-11-27 09:55:27 +01:00
Erik Eckstein
87298c07c8 stdlib: make the non-native Array.count smaller more efficient.
Use _CocoaArrayWrapper.endIndex which returns the NSArray.count.
In the old version, "count" translated to RandomAccessCollection.count, which ended up in multiple calls to endIndex.
2019-11-26 18:20:39 +01:00
Saleem Abdulrasool
683f7f563e build: separate out host build of SwiftRemoteMirror
Separate out the host build of SwiftRemoteMirror from the "target" build
(the host for the standard library may be different from the host for
the compiler).  Restructure the build to ensure that we use the correct
compiler for building the SwiftRemoteMirror for the host.  This fixes a
build issue when building for Linux AArch64.
2019-11-24 10:08:36 -08:00
Diego Torres
3c4eeadc83 Preserve order of predicates
Fixes https://bugs.swift.org/browse/SR-11841
2019-11-24 15:42:33 +01:00
Adrian Prantl
1d5518236d Add missing include for PRIxPTR (NFC) 2019-11-22 13:18:01 -08:00
zhuowei
b9c1deff5f [stdlib] fix return type of getNumRuntimeFunctionCounters (#24182)
The return type of getNumRuntimeFunctionCounters is defined as uint64_t in RuntimeInvocationsTracking.cpp, but it has return type Int in RuntimeFunctionCounters.swift.

Found when compiling the stdlib for WebAssembly, as WebAssembly validates return types. uint64_t corresponds to i64, but Int is i32, so the program fails validation.
2019-11-22 13:44:56 -05:00
Mike Ash
3912e7c8ac [Runtime] Enhance Metadata::dump to dump the number of generic args and the pointer of each. 2019-11-22 13:17:54 -05:00
Stephen Canon
671df74418 Use the truncatingIfNeeded init on the result of these runtime funcs. (#28426)
The swift_floatNToString, swift_int64ToString, and swift_uint64ToString functions all return a uint64_t from c++. This is a historical accident, but these are SWIFT_RUNTIME_STDLIB_API, which means that we can't trivially change the return type. The result should naturally be size_t or int (it's always small enough to fit into *any* c integer type). However, we can elide the check in the caller at the point that the result is converted to Int, because we know that the check will always pass. This makes it so that the only overhead the wrong type introduces on 32b platforms is zeroing a register, which is free or nearly-free.
2019-11-21 20:45:04 -05:00
zhuowei
8b3a15babf [stdlib] Fix return type of swift_{uint64,int64,float*}ToString (#24181)
The return type of these functions are uint64_t in Stubs.cpp but UInt in the Swift code; this changes the Swift code to match the C++ return type.

Found when compiling the stdlib for WebAssembly, which requires that all return types match: UInt maps to i32 while uint64_t maps to i64, so functions calling these functions fail the validation.
2019-11-21 17:21:22 -05:00
Robert Widmann
b9fe66e0e8 Add documentation to _DependenceToken 2019-11-21 10:48:18 -08:00
Arnold Schwaighofer
75c0bf076f Merge pull request #28337 from aschwaighofer/get_type_by_mangled_name_abstract_runtime
Add swift_getTypeByMangledNameInContextInMetadataState such that we can
2019-11-21 07:37:25 -08:00
Mao ZiJun
d5e2533cef improved OptionSet.remove's code style 2019-11-21 14:55:39 +09:00
swift-ci
2fa65ae23a Merge pull request #28393 from DougGregor/error-bridge-to-nsobject-redux 2019-11-20 19:08:46 -08:00
Saleem Abdulrasool
ac1685e5f1 Merge pull request #28348 from compnerd/ballantyne-syndrome
build: split out swiftReflection builds
2019-11-20 18:45:29 -08:00
Mao ZiJun
a8fd973876 fixed OptionSet's remove method 2019-11-21 11:25:41 +09:00
Doug Gregor
859fb0dc45 [Runtime] Handle dynamic casting to NSObject via error bridging.
The dynamic casting machinery failed to account for NSError bridging when
casting to NSObject; check for it explicitly.
2019-11-20 15:56:24 -08:00
Brent Royal-Gordon
bc5d59ecb7 Revert "[Runtime] Handle dynamic casting to NSObject via error bridging." 2019-11-20 10:38:44 -08:00
swift-ci
6d46eb182a Merge pull request #28353 from DougGregor/error-bridge-to-nsobject 2019-11-19 10:24:30 -08:00
Arnold Schwaighofer
cf20dd4cf3 Add swift_getTypeByMangledNameInEnvironmentInMetadataState runtime function 2019-11-19 09:18:04 -08:00
Doug Gregor
ab062fcd14 [Runtime] Handle dynamic casting to NSObject via error bridging.
The dynamic casting machinery failed to account for NSError bridging when
casting to NSObject; check for it explicitly.
2019-11-18 23:00:57 -08:00
Saleem Abdulrasool
cb3365f03d build: split out swiftReflection builds
We would build two copies of swiftReflection, one for the host and one
for the target.  However, the compiler configuration cannot be swapped
out in the middle as we were attempting to do.  This would result in a
failure to build sometimes due to the missing dependency on the wanted
compiler.  More importantly, it would also use the wrong compiler when
building the library.  Although this duplicates the source paths,
correctness is preserved.
2019-11-18 17:17:35 -08:00
swift-ci
598042b521 Merge pull request #21550 from valeriyvan/patch-1 2019-11-18 15:27:40 -08:00