-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Refactoring ArgumentSource and PreparedArguments #19341
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
Refactoring ArgumentSource and PreparedArguments #19341
Conversation
…Source::isShuffle() Also, move the check to make it explicit that only a TupleShuffleExpr at the top level goes through the argument emission code path; a TupleShuffleExpr appearing inside a ParenExpr or TupleExpr is a tuple conversion, which is totally unrelated and emitted as an RValue. This is unfortunate and we should split off ArgumentShuffleExpr from TupleShuffleExpr, and eventually, fold ArgumentShuffleExpr into ApplyExpr.
@swift-ci Please test |
@swift-ci Please test source compatibility |
…ser to their uses
…Param This solves a recently-added TODO, eliminating two usages of FunctionType::getInput() from SILGen.
7965b1c
to
8175552
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
Build failed |
@swift-ci Please test source compatibility |
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.
Is isScalar()
still necessary if you're exploding the parameter type?
@rjmccall Most uses of isScalar are straightforward to eliminate. For example if the apply argument is a TupleExpr we can split it up when building the PreparedArguments. The one exception is when the ArgumentSource is a TupleShuffleExpr. My plan there though is to build a tuple type explicitly and refactor it later. |
@swift-ci Please test source compatibility |
Pushing usages of
AbstractionPattern::getFunctionInput()
down. Getting close, but as you can see they're still there.