-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[silgen] Only borrow args for coroutines rather than general applies … #20022
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
[silgen] Only borrow args for coroutines rather than general applies … #20022
Conversation
…and do not conditionalize based off of the ownership flag being set. This is the last part of SILGen conditionalized on EnableSILOwnership being set. It also (as you can tell from the diff) eliminates a bunch of code from the tests. rdar://29791263
@swift-ci test |
@swift-ci test source compatibility |
Build failed |
java errors... |
@swift-ci text os x platform |
@swift-ci test source compatibility |
@swift-ci test os x platform |
I don't understand why coroutines would be handled differently than normal applies. A coroutine is itself a "scoped" operation". So it uses it's operands up to the end_apply. There's no reason to add another borrow scope around the coroutine. |
That said, it look like these are mostly test case changes, and it would be easy to remove the |
I talked with Andy offline. I am fine with having begin_apply/end_apply be like begin/end borrow for these uses. I do think it complicates the model slightly (since this is another formed of scoped use), but you could also argue the other way that considering apply and begin_apply as different things also complicates the model. Andy and I agreed that we will try this and if it confuses people down the line, we can put in the begin_borrow scope for coroutine. I am going to make that change in a subsequent commit though. |
Build failed |
Build failed |
@swift-ci smoke test |
…and do not conditionalize based off of the ownership flag being set.
This is the last part of SILGen conditionalized on EnableSILOwnership being
set. It also (as you can tell from the diff) eliminates a bunch of code from the
tests.
rdar://29791263