-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Optimize read accessors to just borrow yielded storage references #19790
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
@swift-ci Please test. |
Are yield lists comma separated? If so, you’ll probably need to add a production that includes an optional trailing comma, like the definition for TupleElement. Also, can you add a round-trip test to test/Syntax/round_trip_parse_gen.swift? |
Build failed |
96b59e9
to
6f1fd82
Compare
@swift-ci Please test. |
The parser doesn't actually accept an optional trailing comma currently.
Done. |
Build failed |
Build failed |
if (!arg.isExpr()) return false; | ||
auto argExpr = arg.peekExpr(); | ||
auto lvExpr = findStorageReferenceExprForBorrow(argExpr); | ||
if (!lvExpr) return false; |
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.
This whole check could be a method on ArgumentSource, then you don’t need to expose peekExpr().
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.
Good point; I'll do a follow-up if this test run goes through.
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.
Per Slava's review on swiftlang#19790.
Per Slava's review on swiftlang#19790.
No description provided.