Skip to content

[OpaqueValues] Fix closure handling. #68054

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

Merged

Conversation

nate-chandler
Copy link
Contributor

Rewrote and tested all currently emittable variations of closure handling for opaque values.

In order to do that, made all types with packs be indirect even in opaque values for now. This is motivated by the fact that getting from/setting to a pack currently requires addresses which aren't materialized for tuples. In the fullness of time, these values should be direct in opaque values mode, but for now it can be postponed.

For now, always use indirect convention for types with packs.  This is
motivated by the fact that getting from/setting to a pack currently
requires addresses which aren't materialized for tuples.  In the
fullness of time, these values should be direct in opaque values mode,
but for now it can be postponed.
@nate-chandler nate-chandler force-pushed the opaque-values/20230821/2/closures branch 2 times, most recently from 186baa4 to 13542dc Compare August 22, 2023 14:09
Rewrote and tested all currently emittable variations of closure
handling for opaque values.
@nate-chandler nate-chandler force-pushed the opaque-values/20230821/2/closures branch from 13542dc to ff30221 Compare August 22, 2023 14:48
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please benchmark

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

Timeouts and a UPASS in the debug source compat failure.

@nate-chandler
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility Debug

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility Debug

@nate-chandler
Copy link
Contributor Author

Same source compat failures as in rdar://114339248 .

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's a lot! I can't vouch for the correctness of emitCaptures by code inspection alone, but I'm amazed by the thoroughness of the unit tests.

@nate-chandler nate-chandler merged commit 49865f2 into swiftlang:main Aug 23, 2023
@nate-chandler nate-chandler deleted the opaque-values/20230821/2/closures branch August 23, 2023 22:44
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.

2 participants