Commit Graph

17573 Commits

Author SHA1 Message Date
furby™
c68b0d8320 Fix typos in VCRuntime modulemap.
* https://github.com/swiftlang/swift/issues/77351

Signed-off-by: furby™ <devs@wabi.foundation>
2024-11-01 19:16:00 -06:00
Allan Shortlidge
f4df1a8e52 Merge pull request #77316 from tshortli/unavailable-in-embedded
Sema: Allow calls to @_unavailableInEmbedded functions in compatible contexts
2024-11-01 17:16:22 -07:00
Allan Shortlidge
686ef29e55 Concurrency: Avoid string interpolation in argument to fatalError().
In Embedded Swift, the `String` type is unavailable. This means that the
overload of `fatalError()` that takes a `String` is also unavailable. Specify a
`StaticString` in the setter for `TaskLocal.projectedValue` to satisfy this
constraint.
2024-11-01 13:03:29 -07:00
Ian Anderson
90a2bde994 [CMake] clang-builtin-headers needs to copy the module maps as well as the headers
When copying the clang builtin headers, the module maps need to go with them.

rdar://139084511
2024-11-01 11:24:10 -07:00
Kuba Mracek
d78be484fc [Concurrency] Avoid reinterpret_cast in Concurrency/Task.cpp, fixes crashes in libdispatch 2024-11-01 10:31:58 -07:00
Kuba Mracek
db94dc7d36 [Concurrency] Fix memory leak around mismatched refcounting in Concurrency 2024-10-31 21:43:02 -07:00
Meghana Gupta
dd037f896f Make Atomic.deinit @_transparent 2024-10-31 13:42:34 -07:00
Meghana Gupta
02a58738a0 Remove -enable-ossa-module for Synchronization and Distributed
These modules import Darwin which is not in ossa. -enable-ossa-modules
results in a one-time recompilation of dependencies when they are not in ossa.
This is not compatible with Explicit Build Modules when the original invocation
did not have -enable-ossa-modules.
2024-10-31 10:55:35 -07:00
Mike Ash
bb09297598 [Concurrency] Fix getTaskId.
We should build a 64-bit value from the two 32-bit Id fields, but we were shifting one field by the other. Coincidentally, this managed to produce the correct value until the ID goes beyond 2^32, but after that it's weird and wrong.
2024-10-30 16:53:48 -04:00
Kuba (Brecka) Mracek
8f66bf170e Merge pull request #77270 from kubamracek/embedded-concurrency-arm64e
[Concurrency] Fix arm64e ptrauth violations in Embedded Swift Concurrency
2024-10-30 10:17:32 -07:00
Konrad `ktoso` Malawski
432c9d4549 Merge pull request #77249 from nickolas-pohilets/mpokhylets/stop-task-locals-in-isolated-deinit 2024-10-30 22:21:34 +09:00
Allan Shortlidge
12d72bee73 Merge pull request #77275 from tshortli/rebranch-warnings
Gardening: Address some new warnings
2024-10-29 20:17:30 -07:00
Alejandro Alonso
008e6ee9f3 Merge pull request #77273 from Azoy/fix-builtin-array-reconstruct
Fix Builtin.FixedArray type reconstruction and change integer type mangling
2024-10-29 16:46:02 -07:00
Allan Shortlidge
4ab3aae7c5 Gardening: Suppress -Winvalid-offsetof warnings in static asserts.
There cannot be undefined behavior at compile time, so these warnings can be
ignored when `offsetof` is used in a static assert:

```
warning: offset of on non-standard-layout type 'AsyncTask' [-Winvalid-offsetof]
```
2024-10-29 15:52:53 -07:00
Allan Shortlidge
2de8e5afc2 Gardening: Address -Wunused-but-set-variable warnings. 2024-10-29 15:52:53 -07:00
Kuba Mracek
cf7ea301e1 [Concurrency] Fix arm64e ptrauth violations in Embedded Swift Concurrency 2024-10-28 21:16:48 -07:00
Alejandro Alonso
82743d7427 Add TypeDecoding for Builtin.FixedArray 2024-10-28 17:29:03 -07:00
Ben Barham
f59b2f19e6 Merge branch 'main' into 2024-rebranch-to-main 2024-10-28 13:03:35 -07:00
Mykola Pokhylets
67ab0d7404 Implement disabling task-local values in isolated deinit
As requested by the LSG during the proposal review.
See https://forums.swift.org/t/accepted-with-modifications-se-0371-isolated-synchronous-deinit/74042
2024-10-28 16:15:21 +01:00
Mykola Pokhylets
2acf5b6b6b Refactoring of the TaskLocal::Item
Replace NextLinkType with Item::Kind with more clear definition.
Use llvm::PointerIntPair<>.
Use hierarchy of classes instead of optional fields inside Item.
Combined Storage::copyToOnlyOnlyFromCurrentGroup() into Storage::initializeLinkParent().
Also create parent task marker when copying items created inside withTaskGroup().
Removed Storage::peekHeadLinkType().
2024-10-27 12:32:21 +01:00
Kuba (Brecka) Mracek
98c538a256 Merge pull request #77231 from kubamracek/concurrency-fix-typo-in-nondispatch
[Concurrency] Fix typo (Impll->Impl) in NonDispatchGlobalExecutor.cpp, resolve build failure when using task-to-thread Concurrency model
2024-10-26 11:36:46 -07:00
Kuba (Brecka) Mracek
79d8de952f Merge pull request #77240 from kubamracek/embedded-printing-types
[embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs
2024-10-26 07:56:36 -07:00
Kuba Mracek
68e01f2249 [embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs 2024-10-25 22:05:58 -07:00
Guillaume Lessard
c2abbbf4f6 [span] annotate lifetimes that can’t be correct 2024-10-25 18:45:10 -07:00
Guillaume Lessard
2d65dc4f41 [span] lifetime argument tweaks 2024-10-25 18:45:10 -07:00
Guillaume Lessard
c4c9383658 [span] borrow pointer or buffer initializer parameters 2024-10-25 18:45:10 -07:00
Guillaume Lessard
eaf74acbcb [span] add missing RawSpan initializers 2024-10-25 18:45:10 -07:00
Guillaume Lessard
fafd9d3690 [span] readability improvements 2024-10-25 18:45:10 -07:00
Guillaume Lessard
e37475bace [span] small ABI tweaks 2024-10-25 18:45:10 -07:00
Kuba Mracek
4c58842f7a [Concurrency] Fix typo (Impll->Impl) in NonDispatchGlobalExecutor.cpp, resolve build failure when using task-to-thread Concurrency model 2024-10-25 13:01:20 -07:00
Egor Zhdan
c854fa2c7e Merge pull request #77190 from swiftlang/egorzhdan/std-string-view
[cxx-interop] Allow creating a String from `std::string_view`
2024-10-25 01:39:01 +01:00
Ben Barham
746517c9f2 Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
Conflicts:
  - `test/IRGen/has_symbol.swift` test updates in rebranch. The new test
    will fail, will fix in the next commit.
2024-10-24 14:20:17 -07:00
Dario Rexin
c67b0c73e1 Merge pull request #77197 from drexin/wip-138085348
[Runtime] Fix SwiftError handling in CVW runtime
2024-10-24 13:13:24 -07:00
Egor Zhdan
cb486c6599 [cxx-interop] Allow creating a String from std::string_view
This adds overlay support for initializing a Swift String from C++ `std::string_view`, `std::u16string_view`, `std::u32string_view`.

rdar://138417835
2024-10-24 13:11:09 +01:00
Alastair Houghton
e030e37d3a [Backtracing] Fix macro test.
The `TARGET_OS_` macros are always defined; you need to test their
values.

rdar://137551812
2024-10-24 11:21:37 +01:00
Guillaume Lessard
57345f7f6f [span] remove _shrink functions added for review purposes 2024-10-23 18:19:21 -07:00
Guillaume Lessard
b508206844 [span] improve indices(of:) and byteOffsets(of:) 2024-10-23 18:19:21 -07:00
Dario Rexin
edd9955673 [Runtime] Fix SwiftError handling in CVW runtime
rdar://138085348

Even though errors are ObjC boxes, they can't be tagged pointers and in fact may use that bit to store enum tags, so treating them like regular ObjC references here can cause ref count issues.
2024-10-23 17:31:11 -07:00
Guillaume Lessard
5d49bd60b7 [span] allow start pointers of empty spans to be exposed 2024-10-23 14:59:07 -07:00
Guillaume Lessard
6fa9780bc5 [span] improve _elementsEqual 2024-10-23 14:48:25 -07:00
Guillaume Lessard
108034e4b0 [span] fix a bounds-checking mistake 2024-10-23 14:06:26 -07:00
Guillaume Lessard
e58e50d17c [span] add availability annotations 2024-10-23 13:14:26 -07:00
Guillaume Lessard
909409181a [gardening] add a relevant FIXME comment 2024-10-23 13:14:22 -07:00
Joe Groff
4a12979584 Merge pull request #77188 from al45tair/eng/PR-137551812-ios-fix
[Backtracing] Fix iOS build.
2024-10-23 08:09:00 -10:00
Joe Groff
8242110bbe Merge pull request #76831 from jckarter/builtin-vector
Builtin.FixedArray
2024-10-23 05:20:21 -10:00
Alastair Houghton
95aef6c972 [Backtracing] Fix iOS build.
The new code needs to not build for iOS.

rdar://137551812
2024-10-23 15:49:15 +01:00
swift-ci
85d3dabbec Merge remote-tracking branch 'origin/main' into rebranch 2024-10-23 01:35:18 -07:00
Joe Groff
a184782a38 Introduce a Builtin.FixedArray type.
`Builtin.FixedArray<let N: Int, T: ~Copyable & ~Escapable>` has the layout of `N` elements of type `T` laid out
sequentially in memory (with the tail padding of every element occupied by the array). This provides a primitive
on which the standard library `Vector` type can be built.
2024-10-22 16:21:45 -07:00
Alastair Houghton
2cc93cf7b0 [Backtracing] Bail out earlier for privileged binaries on macOS.
Also remove the code that deals with file descriptors; we will now
only start the backtracer for processes that have the get-task-allow
entitlement, which means that they've been specifically signed for
debugging, and *that* means that it is no longer critical to ensure
that unexpectedly inherited fds are closed.

rdar://137551812
2024-10-22 12:21:58 +01:00
swift-ci
6284e9f325 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-21 17:59:25 -07:00