Commit Graph

12 Commits

Author SHA1 Message Date
Pavel Yaskevich
520c05b1b8 Merge pull request #79508 from xedin/feature-proof-execution-attrs
[Frontend] Rename `NonIsolatedAsyncInheritsIsolationFromContext` feature and add a feature for `@execution`
2025-02-21 09:07:04 -08:00
Pavel Yaskevich
dd1be8f6d4 [Frontend] Hide @execution attribute behind an experimental feature ExecutionAttribute
Since the proposal has not been approved yet we cannot expose
`@execution` attribute.
2025-02-20 00:05:03 -08:00
Pavel Yaskevich
613fbaf76e [Sema] Either variant of @execution is incompatible with other isolation
According to the proposal both variants cannot be used together
with other forms of isolation i.e. isolated parameters, global
actors, `@isolated(any)` attributes.
2025-02-19 20:06:15 -08:00
Pavel Yaskevich
e2ff3308be [Frontend] NFC: Rename NonIsolatedAsyncInheritsIsolationFromContext feature
New name is `AsyncCallerExecution` as stated by the proposal.
2025-02-19 20:00:56 -08:00
Michael Gottesman
3ef18eaf1d Merge pull request #79300 from gottesmm/pr-12bede947a34719b34b1aa8ea6c126a6126d6dd6
[concurrency] Implement serialization for execution(caller)/execution(concurrent).
2025-02-19 18:29:02 -08:00
Pavel Yaskevich
1cd181dcfc [Sema] Only @execution(concurrent) cannot be used with other forms of isolation 2025-02-13 14:35:57 -08:00
Michael Gottesman
945d36ed97 [concurrency] Allow for nonisolated and execution(concurrent) to be used together.
After some discussions, we decided to allow for this since it doesnt harm anything. execution(caller) just takes primacy over it.
2025-02-12 10:38:06 -08:00
Pavel Yaskevich
aad858d66c [Sema] Implement validation of @execution(...) in type context 2025-02-05 10:11:38 -08:00
Michael Gottesman
6a9afa53f7 [concurrency] Add back support for checking if we have a global actor/execution together. 2025-01-28 13:44:23 -08:00
Michael Gottesman
3415189442 [concurrency] Change execution to override inferred global actor isolation to match nonisolated.
Specifically, we were attempting to diagnose cases like the following:

```swift
@MainActor protocol P {
  func foo() async
}

struct S : P {
  @execution(concurrent) func foo() async {}
}
```

This was just an attempt to be more conservative. After some conversations, it
came up that nonisolated does not work that way... that is the compiler will
accept the following and just hop in the protocol witness thunk:

```swift
@MainActor protocol P {
  func foo() async
}

struct S : P {
  nonisolated func foo() async {}
}
```
2025-01-28 12:46:20 -08:00
Pavel Yaskevich
c89ba5f58c [Sema] Diagnose clash between inferred global actor isolation and @execution(concurrent) 2025-01-17 15:40:01 -08:00
Pavel Yaskevich
b1e30b22b9 [Sema] Impliment initial validation of @execution(concurrent) attribute 2025-01-17 15:40:01 -08:00