Skip to content

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Jan 3, 2024

This fixed #69028.

@rjmccall
Copy link
Contributor Author

rjmccall commented Jan 3, 2024

@swift-ci Please smoke test

@rjmccall rjmccall force-pushed the variadic-generic-tuple-reabstraction branch from c31c283 to c1b5902 Compare January 3, 2024 21:38
@rjmccall rjmccall changed the title Variadic generic tuple reabstraction Support variadic generic tuple arguments in reabstraction thunks Jan 3, 2024
@rjmccall rjmccall marked this pull request as ready for review January 3, 2024 21:38
@rjmccall
Copy link
Contributor Author

rjmccall commented Jan 3, 2024

@swift-ci Please test

patterns) in argument positions in reabstraction thunks.

Most of the difficulty in this work continues to center around
(1) trying to reuse as much code as possible between the parameter
and result paths and (2) propagating ownership information as
necessary throughout the code.  I did my best to assert the preconditions
and postconditions here, but undoubtedly I'm missing cases.  Some
simplicity here is still eluding me here.

This patch necessarily changes quite a bit of the code used in
non-variadic paths.  I tried to avoid doing things that I knew would
be risky, like optimizing copies.  I did fail in a few places: e.g.
we should now generate significantly better code when erasing to
Optional<Any>, just because the code was oddly poorly-factored before.
You can see the effect on the function_conversion test case.
@rjmccall rjmccall force-pushed the variadic-generic-tuple-reabstraction branch from c1b5902 to c66ccbc Compare January 4, 2024 00:28
@rjmccall
Copy link
Contributor Author

rjmccall commented Jan 4, 2024

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter packs for functions with arbitrary parameters causes compiler crash when passed a function with more than zero parameters
1 participant