-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0][region-isolation] Upstreaming some fixes #73483
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@swift-ci test |
gottesmm
force-pushed
the
release/6.0-more-fixes
branch
from
May 14, 2024 00:27
c01b905
to
3739dc6
Compare
@swift-ci test |
gottesmm
changed the title
[6.0][region-isolation] Upstreaming two fixes
[6.0][region-isolation] Upstreaming some fixes
May 14, 2024
gottesmm
force-pushed
the
release/6.0-more-fixes
branch
from
May 14, 2024 13:35
3739dc6
to
9cf46ab
Compare
@swift-ci test |
gottesmm
force-pushed
the
release/6.0-more-fixes
branch
from
May 14, 2024 20:42
9cf46ab
to
99fee4e
Compare
@swift-ci test |
Linux test failed b/c of java exception. |
@swift-ci test linux platform |
hborla
approved these changes
May 15, 2024
Again some sort of weird Jenkins errors. |
@swift-ci test linux platform |
@swift-ci test macOS platform |
@swift-ci test linux platform |
@swift-ci test macOS platform |
…lement_addr geps. Just an initial commit. Going to add more tests. rdar://127006035. (cherry picked from commit 14f5623)
…ake_enum_data_addr/struct_element_addr fields. (cherry picked from commit 077f62c)
… suppress transferring in swift interface files. Importantly I added tests that validated this behavior. rdar://126780823 (cherry picked from commit dc25857)
…e next commit. Specifically, I added a few helper methods and improved the logging printing. This all makes the next commit a more focused commit. (cherry picked from commit 9bfb3b7)
…on-self isolated parameters as well as self parameters that are actor isolated. As part of this I went through how we handled inference and rather than using a grab-bag getActorIsolation that was confusing to use, I created split APIs for specific use cases (actor instance, global actor, just an apply expr crossing) that makes it clearer inside the SILIsolationInfo::get* APIs what we are actually trying to model. I found a few issues as a result and fixed most of them if they were small. I also fixed one bigger one around computed property initializers in the next commit. There is a larger change I didn't fix around allowing function ref/partial_apply with isolated self parameters have a delayed flow sensitive actor isolation... this will be fixed in a subsequent commit. This also fixes a bunch of cases where we were printing actor-isolated instead of 'self' isolated. rdar://127295657 (cherry picked from commit 50c2d67)
rdar://127844737 (cherry picked from commit 35a5a25)
(cherry picked from commit 9504dc9)
…use when printing SIL instructions. (cherry picked from commit 085f3d7)
… a header. This works around a layering violation where libSwiftBasic includes parts of the AST even though it shouldn't. (cherry picked from commit 5e6b247)
…g isolation of a sil_isolated parameter. It is unnecessary and seems to be slightly out of sync sometimes around closures. (cherry picked from commit c1d0c8c)
…ctor types. I also added some docs to SIL.rst about sil_isolated as well. (cherry picked from commit f51a050)
The specific problem was that the AST was looking for Actor/AnyActor in _Concurrency... but I named the module of the test borrowing (for some reason). So the machinery was failing to think that my stubbed out protocols where the true known protocols. By changing the module name to _Concurrency, everything worked out. (cherry picked from commit 4aea60c)
After following up with @slavapestov and @xedin, I was right to be suspicious of my changes here. Instead of attempting to hard code this, I do the right thing and I map the relevant type into the function's generic context and then do the check. This ensures that when isAnyActorType() performs the conformance check, ModuleDecl::lookupConformance() has a generic signature to work with. (cherry picked from commit 4412fff)
…use getAnyActor instead of getNominalOrBoundGenericNominal(). This ensures that we can properly compute isolation for generic types that conform to AnyActor. I found this by playing with test cases from the previous commit. We would not find an actor type for the actor instance isolation and would fall back along an incorrect path. rdar://128021548 (cherry picked from commit fe2dc11)
…to use transferred non-Sendable parameters. This is safe since: 1. We transfer in the non-Sendable parameter into the global actor isolation region so we know that we will not use the non-Sendable paramter again except on that actor. 2. Since the closure is global actor isolated, we know that despite the fact that it is Sendable, it will only ever be executed serially on said global actor implying that we do not need to worry about different executions of the Sendable closure running concurrently with each other. rdar://125200006 (cherry picked from commit c3309d6)
…t 6 feature. rdar://118244451 (cherry picked from commit de85b79)
gottesmm
force-pushed
the
release/6.0-more-fixes
branch
from
May 16, 2024 15:04
f7fcab0
to
2b1c380
Compare
Hit a merge conflict with the borrow switch enablement. |
@swift-ci test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: This contains a series of fixes from main into release/6.0.
Radars:
Original PRs:
Risk: Low. Just affects region isolation.
Testing: Added tests to the test suite.
Reviewer: N/A