-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[concurrency] allow 'get' access to properties from outside the actor #35965
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
Conversation
420aa0c
to
59f8462
Compare
@swift-ci please smoke test |
125f876
to
7c8030c
Compare
@swift-ci please smoke test |
@swift-ci please smoke test Windows Platform |
33dabd5
to
7fdb0b2
Compare
@swift-ci please smoke test |
7fdb0b2
to
83b88c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least from the typechecking and actor isolation side this looks good to me AFAICS, from what I know about those pieces having worked on those a little bit... May need a proper compiler person to review but looks good :)
83b88c2
to
3fd3ba5
Compare
@swift-ci please smoke test |
The design of things are currently a bit in flux, so until that settles down, I thought it would be better to just log this as a possible clean-up in the future.
3fd3ba5
to
d67c50c
Compare
d67c50c
to
0f10638
Compare
We now mark some DeclRefExpr and LookupExprs as implicitly async during typechecking, depending on whether they appear in a context that is only performing a read / get operation, and whether they are cross-actor operations. also resolves rdar://72403401 by improving the error messages (no more vague "'await' in async context" when its clearly a call!)
…not made it to SILGen For the dynamic versions of LookupExprs, we do not expect these to be implicitly async. For the other cases, I simply haven't implemented them yet.
The strategy for implementing them is integrated with the PathComponent infrastructure in SILGen in order to correctly support mixtures of chained accesses and forced optionals, etc. The actor isolation information is only piped into LValues from the expressions that might be marked implicitly-async.
0f10638
to
de0d998
Compare
@swift-ci please smoke test and merge |
Resolves rdar://74199653
TODOs:
'async' in a function that does not support concurrency
(rdar://72403401)Make sure we disallow read accesses to subscripts that take anTurns out we don't allowinout
argument.inout
on subscript parameters in general._modify
and_read
accessors.Something to fix in a later PR: