mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Some notes: This is not emitted by SILGen. This is just intended to be used so I can write SIL test cases for transfer non sendable. I did this by adding an ActorIsolationCrossing field to all FullApplySites rather than adding it into the type system on a callee. The reason that this makes sense from a modeling perspective is that an actor isolation crossing is a caller concept since it is describing a difference in between the caller's and callee's isolation. As a bonus it makes this a less viral change. For simplicity, I made it so that the isolation is represented as an optional modifier on the instructions: apply [callee_isolation=XXXX] [caller_isolation=XXXX] where XXXX is a printed representation of the actor isolation. When neither callee or caller isolation is specified then the ApplyIsolationCrossing is std::nullopt. If only one is specified, we make the other one ActorIsolation::Unspecified. This required me to move ActorIsolationCrossing from AST/Expr.h -> AST/ActorIsolation.h to work around compilation issues... Arguably that is where it should exist anyways so it made sense. rdar://118521597
19 KiB
19 KiB