mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Specifically: 1. I made it so that thunks from caller -> concurrent properly ignore the isolated parameter of the thunk when calling the concurrent function. rdar://148112362 2. I made it so that thunks from concurrent -> caller properly create a Optional<any Actor>.none and pass that into the caller function. rdar://148112384 3. I made it so that in cases where we are assigning an @Sendable caller to a non-sendable caller variable, we allow for the conversion as long as the parameters/results are sendable as well. rdar://148112532 4. I made it so that when we generate a thunk from @execution(caller) -> @GlobalActor, we mangle in @GlobalActor into the thunk. rdar://148112569 5. I discovered that due to the way we handle function conversion expr/decl ref expr, we were emitted two thunks when we assigned a global @caller function to a local @caller variable. The result is that we would first cast from @caller -> @concurrent and then back to @caller. The result of this would be that the @caller function would always be called on the global queue. rdar://148112646 I also added a bunch of basic tests as well that showed that this behavior was broken.
314 KiB
314 KiB