Commit Graph

17564 Commits

Author SHA1 Message Date
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
Ben Barham
2523660d3b Revert "[DebugInfo] Stop emitting spare bits mask in debug info" 2024-10-21 14:23:04 -07:00
Kuba Mracek
0048c1c624 [embedded] Document the details of the Embedded Swift's refcounting scheme 2024-10-21 08:56:22 -07:00
swift-ci
8af1ee5f5f Merge remote-tracking branch 'origin/main' into rebranch 2024-10-21 08:55:27 -07:00
Guillaume Lessard
979523014c [span] update to match latest proposal tweaks 2024-10-19 23:46:54 -07:00
Kuba Mracek
8666aef39f [embedded] Fix a memory leak caused by incorrect refcounting logic around doNotFreeBit 2024-10-18 23:19:40 -07:00
Guillaume Lessard
7faf7bc634 [stdlib] add Span 2024-10-18 22:57:43 -07:00
Guillaume Lessard
5b3647270b [stdlib] add RawSpan 2024-10-18 22:57:43 -07:00
Guillaume Lessard
5e819aeea6 [stdlib] generalize isPOD() over suppressible protocols 2024-10-18 22:57:43 -07:00
swift-ci
fa99c9a86c Merge remote-tracking branch 'origin/main' into rebranch 2024-10-17 19:01:34 -07:00