Skip to content

[OpaqueValues] Map-into-context back-deploy thunk results. #62857

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

When a throwing function which returns a generic (this is the simplest example) is back deployed, it gets a back deploy thunk. This back deploy thunk calls one of two variations of the function, depending on availability, both which have the same signature and in particular both return a generic. The result type of that function signature is an unbound generic.

Previously, that result type was used as is. Consequently the success blocks for the try_apply instructions in these thunks had arguments of unbound generic type.

Here, that type is mapped into the context of the function being emitted. The thunks now have the appropriate bound generic type.

When a throwing function which returns a generic (this is the simplest
example) is back deployed, it gets a back deploy thunk.  This back
deploy thunk calls one of two variations of the function, depending on
availability, both which have the same signature and in particular both
return a generic.  The result type of that function signature is an
unbound generic.

Previously, that result type was used as is.  Consequently the success
blocks for the try_apply instructions in these thunks had arguments of
unbound generic type.

Here, that type is mapped into the context of the function being
emitted.  The thunks now have the appropriate bound generic type.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review January 6, 2023 00:07
@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility Release

@nate-chandler nate-chandler merged commit 191a85d into swiftlang:main Jan 6, 2023
@nate-chandler nate-chandler deleted the opaque-values/1/20230104 branch January 6, 2023 15:08
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.

🥇

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