Commit Graph

13406 Commits

Author SHA1 Message Date
swift-ci
92f84f8191 Merge pull request #29835 from devincoughlin/isOSVersionAtLeast-no-inline-for-you 2020-02-13 22:04:19 -08:00
Devin Coughlin
664e7cc00e [Availability] Make _stdlib_isOSVersionAtLeast() no longer inlinable
To make it possible to change the implementation of
_stdlib_isOSVersionAtLeast(), remove the @inlinable attribute from it.

Since it is currently inlinable and calls the helper function
_swift_stdlib_operatingSystemVersion(), we’ll have to keep the
helper around as ABI.

This change causes a minor pessimization where the LLVM optimizer can no
longer reason that, for example, a successful check for 10.12 availability
means that a later check for 10.11 will always succeed. I don't expect this
pessimization to be a problem, but if needed we could write a custom SIL
optimizer pass to claw back the performance.

<rdar://problem/59447474>
2020-02-13 20:08:48 -08:00
Daniel Rodríguez Troitiño
5e05ce5ff9 [android] Enable SwiftPrivateThreadExtras to build in Android.
Disabled by mistake in #29530.
2020-02-13 14:15:49 -08:00
Dmitri Gribenko
3566e6ed7a Merge pull request #29530 from swiftwasm/swiftwasm-ifdefs
[WebAssembly] Add ifdefs for the WASI target
2020-02-13 17:40:45 +01:00
Ravi Kandhadai
3c7f6d88e2 [stdlib/private][OSLog] Add basic support for interpolating floating-point
types without formatting options, add an auto-inferred privacy mode and
make it the default privacy mode, add support for aligning string
arguments.
2020-02-12 18:46:50 -08:00
tbkka
74df8725ab SR-12161 Casting P.self to P.Type regressed in iOS13.4 beta (#29779)
* SR-12161 Casting P.self to P.Type regressed in iOS13.4 beta

An earlier fix for certain protocol casts inadvertently disabled
the check for a protocol being cast to its own metatype.
This rearranges the code so that identical types always succeed.
It also updates swift_dynamicCastMetatypeUnconditional to
include recent changes to swift_dynamicCastMetatype.

Note: These fixes only apply to debug/non-optimized builds.
Cast optimizations still break a lot of these cases.
2020-02-12 14:24:31 -08:00
Karoy Lorentey
bbd888f727 Merge pull request #29498 from xwu/any-hashable-docs
[docs] Update AnyHashable documentation
2020-02-12 13:16:15 -08:00
nate-chandler
b62871047d Merge pull request #29345 from nate-chandler/generic-metadata-prespecialization-components/enums
Generic metadata prespecialization: enums
2020-02-12 13:09:59 -08:00
Saleem Abdulrasool
97df90fbf1 Merge pull request #29581 from drexin/wip-fix-atomics
Remove dependency on libatomic on Linux
2020-02-11 20:03:10 -08:00
Robert Widmann
054d7b9913 Merge pull request #29713 from CodaFi/unused-unwanted-unloved
[Gardening] Silence Some Warning Spew
2020-02-11 15:46:16 -08:00
Nate Chandler
949029a788 [metadata prespecialization] Create enum records.
Extracted implementation of SpecializedGenericStructMetadataBuilder into
SpecializedGenericNominalMetadataBuilderBase, a CRTP with a template
template argument for the CRTP superclass and a template argument for
the implementation.  That new type is now subclassed by
SpecializedGenericStructMetadataBuilder.  Additionally, this new type is
also subclassed by the newly added SpecializedGenericEnumMetadataBuilder
which is responsible for build the prespecialization of generic enum
metadata.

rdar://problem/56960887
2020-02-11 09:57:22 -08:00
swift-ci
e7e6d27ac9 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-08 10:24:29 -08:00
Max Desiatov
67297904ac [WebAssembly] Add ifdefs for the WASI target 2020-02-08 07:37:10 +00:00
Ravi Kandhadai
ec9844b2d9 [SIL Optimization] Add a new mandatory pass for unrolling forEach
calls over arrays created from array literals. This enables optimizing
further the output of the OSLogOptimization pass, and results in
highly-compact and optimized IR for calls to the new os log API.

<rdar://58928427>
2020-02-07 20:06:29 -08:00
swift-ci
5839095f7b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-07 20:03:35 -08:00
swift-ci
eed603d980 Merge pull request #29518 from ravikandhadai/oslog-string-formatting 2020-02-07 19:55:43 -08:00
Ravi Kandhadai
4f2a55bdd4 [stdlib/private][OSLog] Support expressive, fprintf-style formatting
options for integers passed to os log string interpolation.
2020-02-07 17:36:06 -08:00
Robert Widmann
d2360d2e8c [Gardening] dyn_cast -> isa 2020-02-07 16:09:31 -08:00
swift-ci
0cbfcbb517 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-06 21:44:26 -08:00
Robert Widmann
1ed846d852 Merge pull request #25696 from kelvin13/comparable-enums
synthesized comparable for enums
2020-02-06 21:38:36 -08:00
swift-ci
5494064049 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-06 09:03:42 -08:00
Xiaodi Wu
06f12fc268 Incorporate further review comments 2020-02-05 20:30:33 -05:00
Saleem Abdulrasool
4ca4d91ef6 build: remove some left over variables 2020-02-05 14:17:51 -08:00
swift-ci
6fb97ab34e Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-05 08:25:22 -08:00
NevinBR
a7f28785c9 Fixes for FixedWidthInteger.random(in: ClosedRange<Self>, using:) (#29633)
Allow the closed-range version of `FixedWidthInteger.random(in:using:)` to work for types larger than 64 bits when the entire valid range (`.min ... .max`) is passed in.

Also, closed ranges are never empty, so the unnecessary `!isEmpty` precondition has been removed.
2020-02-05 17:17:20 +01:00
Butta
3f4109b3a2 [android] Get build scripts working natively, fix tests and install
The build scripts assume Android cross-compilation using the NDK, so avoid
that configuration if building on an Android host. Fix or disable some tests,
and don't install a glibc.modulemap without a native sysroot prefix.
2020-02-05 11:36:33 +05:30
Kelvin
19a8759cee Merge branch 'master' into comparable-enums 2020-02-04 22:08:40 -06:00
swift-ci
cce83c4c7b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-04 13:23:45 -08:00
Ravi Kandhadai
e631c66e0d [stdlib/private][os log] Annotate tiny helper functions in the new
os log overlay @_transparent so that they will be inlined in their
callers even annotated as @_optimize(none).

Make the OSLogPrototypeCompileTest.swift test suite check only the
output of the OSLogOptimization pass instead of the output of the
Onone pipeline. This will make the tes more resilient to adding
mandatory optimizations later in the pass pipeline. Also, remove
a duplicate test from the OSLogPrototypeExecTest suite.
2020-02-04 11:03:38 -08:00
swift-ci
2d9227da4c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-02 13:23:57 -08:00
Saleem Abdulrasool
c5c7ed17b8 build: hoist LINK_LIBRARIES out of _add_swift_executable_single
Hoist the responsibility for adding the linked libraries out of
`_add_swift_executable_single` to the invoker.  This impacts only
`swift_add_target_executable`.  This continues to bring the computation
of the properties nearer the site of definition.
2020-02-02 08:58:41 -08:00
Dario Rexin
d913eefcc9 Remove dependency on libatomic on Linux
Due to some unfortunate interplay between clang and libstdc++, clang was
not able to correctly identify to alignment of PoolRange and
SideTableRefCountBits, causing it to emit library calls instead of
inlining atomic operations. This was fixed by adding the appropriate
alignment to those types. In addition to that the march for the Linux
target was set to 'core2', which is the earliest architecture to support
cx16, which is necessary for the atomic operations on PoolRange.
2020-01-31 15:59:54 -08:00
swift-ci
11f1706e64 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-29 19:43:09 -08:00
Xiaodi Wu
4ee0cc16e1 Update stdlib/public/core/AnyHashable.swift
Co-Authored-By: Karoy Lorentey <klorentey@apple.com>
2020-01-29 21:15:04 -05:00
Chris Amanse
e13ea48dcd Private method should be for non-Windows only 2020-01-29 14:14:12 -08:00
swift-ci
054c288643 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-29 08:24:01 -08:00
Chris Amanse
ffa6bf4729 Fix memory leaks in ThreadBarriers.swift (#12212)
* Fix memory leaks in ThreadBarriers.swift

* Fatal error on pthread cond/mutex destroy failure

* Rename pthread to thread

* Fix pthread init function calls

* Fix guard statement
2020-01-29 08:21:52 -08:00
swift-ci
770f5e252c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 18:44:06 -08:00
Max Desiatov
44a6475566 [WebAssembly] enable shims and stubs for WASI (#29505)
* [WebAssembly] enable shims and stubs for WASI

* Implement _swift_stdlib_getUnsafeArgvArgc for WASI

* Make include unconditional, add JIRA links
2020-01-28 18:29:52 -08:00
Xiaodi Wu
518ccce520 Optimize documentation wording for clarity 2020-01-28 21:07:58 -05:00
Xiaodi Wu
1e861acd1f Incorporate review comments 2020-01-28 21:00:52 -05:00
swift-ci
98bd56e58d Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 11:03:20 -08:00
Ravi Kandhadai
566d574f4d Merge pull request #29501 from ravikandhadai/constexpr-binary-integer-description
[Constant Evaluator] Add support for BinaryInteger.description which converts an integer to a string
2020-01-28 11:01:47 -08:00
Ravi Kandhadai
c198c1a2aa [Constant Evaluator] Add support for BinaryInteger.description which
converts an integer to a string. This patch adds a @_semantics
annotation to the BinaryInteger.description function.
2020-01-27 21:13:50 -08:00
Xiaodi Wu
31e9807fc8 Update AnyHashable documentation 2020-01-27 22:00:33 -05:00
swift-ci
52f62ce7da Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 18:03:21 -08:00
David Smith
c8fa3b64e5 Merge pull request #29445 from Catfish-Man/fast-dealloc-fixups
Update fast dealloc to match libobjc
2020-01-27 17:47:31 -08:00
swift-ci
7291837209 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 06:44:23 -08:00
David Zarzycki
8732b15597 [Testing] Fix unused/read-only variable warnings 2020-01-27 06:12:02 -05:00
swift-ci
26ab9840a4 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-26 09:03:30 -08:00