Commit Graph

234 Commits

Author SHA1 Message Date
Guillaume Lessard
a345e3a8b3 Merge pull request #83000 from glessard/rdar147780495-OutputSpan-updates-62
[SE-0485, 6.2] OutputSpan and OutputRawSpan
2025-07-17 19:12:58 -07:00
Konrad `ktoso` Malawski
8e4d9a3c8a [6.2][Concurrency] Remove symbols of startSynchronously, make it AEIC (#83089)
Co-authored-by: Pavel Yaskevich <pyaskevich@apple.com>
2025-07-17 00:44:36 -07:00
Guillaume Lessard
2a88f0e764 [stdlib] add OutputSpan to backdeployment library 2025-07-16 17:19:42 -07:00
Alastair Houghton
eefdd69c8d Merge pull request #82915 from al45tair/eng/PR-151147606-take2
[Concurrency] Remove custom global executors from 6.2.
2025-07-14 16:20:57 +01:00
Guillaume Lessard
16afe633d2 [test] abi accounting 2025-07-11 19:03:01 -07:00
Alastair Houghton
bd289dc548 [Concurrency] Remove custom global executors from 6.2.
The custom global executors work is not landing in 6.2, so make
sure it isn't public there.

rdar://151147606
2025-07-09 15:45:15 +01:00
Pavel Yaskevich
3c98a1e76f Merge pull request #82885 from swiftlang/revert-82860-remove-startSynchronously-6.2
Revert "[6.2][Concurrency] Remove deprecated `Task.startSynchronously` API"
2025-07-09 00:19:30 -07:00
Doug Gregor
958e74c48c Merge pull request #82852 from DougGregor/span-back-deployment-version-fixes-6.2
[6.2] Fix deployment version for Span back-deployment library
2025-07-08 16:09:03 -07:00
Pavel Yaskevich
67c787dd1f Revert "[6.2][Concurrency] Remove deprecated Task.startSynchronously API" 2025-07-08 11:35:31 -07:00
Doug Gregor
4271bdedd3 Update expected ABI symbols for $ld$previous on x86_64 2025-07-08 07:57:27 -07:00
Doug Gregor
e95e230d47 Update expected ABI symbols for $ld$previous 2025-07-07 23:02:55 -07:00
Pavel Yaskevich
aa89147743 [Concurrency] Remove deprecated Task.startSynchronously API
This is the original spelling which was not accepted. We kept
it for a bit to give adopters time to switch but it's time to
remove it now.

(cherry picked from commit e108524d98)
2025-07-07 16:47:56 -07:00
Alastair Houghton
2323449a00 Merge pull request #82526 from al45tair/eng/PR-153531418-6.2
[Concurrency] Rename Dummy(Main|Task)Executor.
2025-07-03 15:07:34 +01:00
David Smith
f8c1df8e09 [6.2] Native implementation of -lengthOfBytesUsingEncoding (#82747) 2025-07-03 05:08:37 -07:00
Guillaume Lessard
3c0f754a4e [test] forget more removed ABI 2025-06-28 03:52:20 -07:00
Guillaume Lessard
2db635fe50 [test] forget removed ABI
This reverts commit 4d064426a8.
2025-06-28 03:51:39 -07:00
Alejandro Alonso
496aa11ec3 Adjust ABI test and guard address of property 2025-06-28 03:51:16 -07:00
Alastair Houghton
0dde6a561d [Concurrency] Rename Dummy(Main|Task)Executor.
`UnimplementedExecutor` seems like a better name.

rdar://153531418
2025-06-26 10:55:00 +01:00
Guillaume Lessard
484d7c7d46 Merge pull request #82422 from glessard/rdar153219174-UMBP-mutableSpan-62
[stdlib, 6.2] add missing computed properties (again)
2025-06-25 14:44:48 -07:00
Guillaume Lessard
4d064426a8 [test] acknowledge ABI additions 2025-06-23 11:20:48 -07:00
Egor Zhdan
bf20dab48c Merge pull request #82185 from swiftlang/susmonteiro/6.2-class-metadata-private-fields
🍒 [cxx-interop] Support for printing C++ foreign references
2025-06-23 17:52:00 +01:00
Guillaume Lessard
9de70180f7 Revert "Merge pull request #82284 from glessard/rdar153219174-UMBP-mutableSpan-62"
This reverts commit 845b68a7c4, reversing
changes made to 3d1c592456.
2025-06-18 13:55:44 -07:00
Guillaume Lessard
0a19cef960 [test] acknowledge ABI additions 2025-06-17 15:57:52 -07:00
Philippe Hausler
90f6a8a876 [Observation] Initial implementation of Observed for transactional tracked values over time (#79817) (#82197)
- **Explanation**:
This is an implementation for the feature
https://github.com/swiftlang/swift-evolution/pull/2726
- **Scope**:
This is targeted specifically to the Observation module, no language or
runtime changes
- **Issues**:

- **Original PRs**:
https://github.com/swiftlang/swift/pull/79817
- **Risk**:
Low
- **Testing**:
This was tested in external forms (which need to be merged in)
- **Reviewers**:

---------

Co-authored-by: Stephen Canon <scanon@apple.com>
2025-06-12 09:14:18 -04:00
susmonteiro
862efcf3a0 [cxx-interop] Support for printing C++ foreign references
Adds support for printing a C++ foreign reference in Swift.

Also skips metadata of private fields in C++ records imported as Swift classes, following up on #81035

(cherry-picked from 848fad0021)
2025-06-11 17:13:01 +01:00
Guillaume Lessard
3a3ea0cb10 Merge pull request #81871 from glessard/rdar138440979-mutablespan-abi-fix-62
[6.2, stdlib] fix an extraneous symbol exported by MutableSpan
2025-05-30 18:01:25 -07:00
Guillaume Lessard
6acbdde394 [stdlib] fix an extraneous symbol exported by MutableSpan 2025-05-30 08:23:42 -07:00
Joe Groff
ad12b7862f Merge pull request #81796 from jckarter/no-non-escapable-property-descriptors-6.2
[6.2] SILGen: Emit property descriptors for conditionally Copyable and Escapable types.
2025-05-29 07:52:39 -07:00
Pavel Yaskevich
f404274e6d [Concurrent] Restored old symbol for obsoleted Task.startSynchronously
https://github.com/swiftlang/swift/pull/80821 added `@isolated(any)`
which is an ABI breaking change but since we are not planning to keep
this API around, let's use `@_silgen_name` to bring the old name back
for now.

Resolves: rdar://152178221
2025-05-29 06:48:31 +09:00
Joe Groff
5ca6ad9d5e SILGen: Emit property descriptors for conditionally Copyable and Escapable types.
Key paths can't reference non-escapable or non-copyable storage declarations,
so we don't need to refer to them resiliently, and can elide their property
descriptors.

However, declarations may still be conditionally Copyable and Escapable, and
if so, then they still need a property descriptor for resilient key path
references. When a property or subscript can be used in a context where it
is fully Copyable and Escapable, emit the property descriptor in a generic
environment constrained by the necessary conditional constraints.

Fixes rdar://151628396.
2025-05-27 20:18:58 -07:00
Pavel Yaskevich
5997a4dec4 [stdlib] Adopt @_inheritActorContext(always) on Task.immediate
This change aligns implementation with the current SE-0472 proposal.

(cherry picked from commit c3c1b4fca0)
(cherry picked from commit 8c05636e28)
(cherry picked from commit 0598b8c9f4)
2025-05-22 11:32:37 -07:00
Pavel Yaskevich
2bf00077e4 [stdlib] SE-0472: Rename Task and*TaskGroup APIs to match the proposal
`Task.startSynchronously` -> `Task.immediate`
`*TaskGroup.startTaskSynchronously{UnlessCancelled}` -> `*TaskGroup.addImmediateTask{UnlessCancelled}`

(cherry picked from commit 001eab867d)
2025-05-13 20:11:28 -07:00
Konrad 'ktoso' Malawski
05ddcac51b [Concurrency] Update ABI for startSynchronously
(cherry picked from commit b76abb4a99)
2025-05-13 20:11:28 -07:00
Michael Gottesman
322a376432 Merge pull request #81334 from gottesmm/release/6.2-rdar150695113
[6.2][swift-settings] Now that we aren't using it immediately, remove it from tree.
2025-05-06 22:41:46 -07:00
Alejandro Alonso
2cc9fc61f4 Merge pull request #80855 from Azoy/62-value-generic-namelookup
[6.2] [NameLookup] Allow value generics to show up as static members
2025-05-06 20:55:07 -07:00
Michael Gottesman
e04e15f125 [swift-settings] Now that we aren't using it immediately, remove it from tree.
We can always get it back from the git history.

rdar://150695113
(cherry picked from commit 9d59dbed17)

Conflicts:
	include/swift/AST/DiagnosticsSema.def
	include/swift/Basic/Features.def
	test/abi/macOS/arm64/concurrency.swift
	test/abi/macOS/x86_64/concurrency.swift
2025-05-06 14:12:23 -07:00
Alejandro Alonso
12919a2300 Merge pull request #78248 from Azoy/value-generic-static-member
[NameLookup] Allow value generics to show up as static members
2025-05-05 18:42:15 -07:00
Doug Gregor
36a93dc91e Revert "[6.2][Concurrency] Hashable funcs should be inlinable for AsyncStream…"
This reverts commit ec7ed9ac39.
2025-05-05 10:02:38 -07:00
Stephen Canon
88e29fafc9 [6.2] Add static .nanoseconds(_: Double) to Duration (#81210) (#81236)
SE-0329 defines the following static factory methods:
```
public static func seconds<T: BinaryInteger>(_ seconds: T) -> Duration
public static func seconds(_ seconds: Double) -> Duration
public static func milliseconds<T: BinaryInteger>(_ milliseconds: T) -> Duration
public static func milliseconds(_ milliseconds: Double) -> Duration
public static func microseconds<T: BinaryInteger>(_ microseconds: T) -> Duration
public static func microseconds(_ microseconds: Double) -> Duration
public static func nanoseconds<T: BinaryInteger>(_ value: T) -> Duration
```
For no good reason, the obvious additional method:
```
public static func nanoseconds(_ nanoseconds: Double) -> Duration
```
was omitted. After talking this through with the LSG, we have decided
that this is simply a bug, and we will add this method without formal
evolution review.
2025-05-02 15:17:45 -07:00
Konrad `ktoso` Malawski
f6a864a188 Merge pull request #81135 from ktoso/pick-22b20e731eaa70746d3c21bf8c44836aa49dfabb
[6.2][Concurrency] Change isIsolatingCurrent... to return Bool?
2025-05-02 07:53:12 +09:00
Konrad `ktoso` Malawski
ec7ed9ac39 [6.2][Concurrency] Hashable funcs should be inlinable for AsyncStream (#81127)
Small review followup for https://github.com/swiftlang/swift/pull/81064/

The impls should be @inlinable.

Original PR: https://github.com/swiftlang/swift/pull/81126
Radar: rdar://149914179
2025-04-30 00:58:01 -07:00
Guillaume Lessard
b442d3177b Merge pull request #80740 from glessard/rdar137710901-addressable-span-properties
[6.2, SE-0456, -0467] enable span properties for inline-storage types
2025-04-29 12:29:34 -07:00
Konrad 'ktoso' Malawski
eaf0b15ea3 [Concurrency] Change isIsolatingCurrent... to return Bool?
This changes the isIsolatingCurrentContext function to return `Bool?`
and removes all the witness table trickery we did previously to detect
if it was implemented or not. This comes at a cost of trying to invoke
it always, before `checkIsolated`, but it makes for an simpler
implementation and more checkable even by third party Swift code which
may want to ask this question.

Along with the `withSerialExecutor` function, this now enables us to
check the isolation at runtime when we have an `any Actor` e.g. from
`#isolation`.

Updates SE-0471 according to
https://forums.swift.org/t/se-0471-improved-custom-serialexecutor-isolation-checking-for-concurrency-runtime/78834/
review discussions
2025-04-28 19:17:58 +09:00
Mykola Pokhylets
d1b3cca1d9 Added Hashable conformance to Async(Throwing)Stream.Continuation 2025-04-24 13:16:54 +09:00
Slava Pestov
001b1129f7 stdlib: Update {Mutable,}{Raw,}Span availability for backward deployment 2025-04-21 15:01:29 -04:00
Michael Ilseman
393c24ddd7 UTF8Span (#78531) (#80890)
Add support for UTF8Span

Also, refactor validation and grapheme breaking
2025-04-18 10:01:15 -04:00
Guillaume Lessard
803fafb0f7 [test] the ABI changed, as expected 2025-04-09 12:41:27 -07:00
Mike Ash
7edc799b16 [6.2][RemoteMirror] Fix AsyncTask child iteration.
Iterating child tasks depends on knowing the size of AsyncTask, and changing the size of the task broke it. Instead of relying on mirroring the full structure in our out-of-process definitions, add a debug variable to libswift_Concurrency that contains the size of AsyncTask.

While we're there, add some more validation to child task enumeration. Check each child task's metadata pointer to make sure that it actually points to the AsyncTask metadata, and have the inner loop also increment and check ChildTaskLoopCount to stop runaway iteration in that loop.

rdar://148836760

(cherry picked from commit e3057031da)
2025-04-08 15:23:05 -04:00
Guillaume Lessard
aedb869c69 Merge pull request #80116 from glessard/rdar137710901-utf8view-span-notsmol
[SE-0456] Span properties over utf8 views
2025-04-03 01:02:14 -07:00
Alastair Houghton
2e6d7f7160 [Tests] Update concurrency ABI baselines. (#80462)
I'd updated the `baseline-asserts` but not the `baseline` files.

rdar://148246151
2025-04-02 07:16:33 -06:00