Skip to content
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

[IRGen] Return typed errors directly in synchronous functions when po… #74192

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Jun 6, 2024

…ssible

rdar://129359355

This PR implements the basic support for returning typed errors directly and applies it to synchronous functions.

@drexin drexin requested a review from aschwaighofer June 6, 2024 21:13
@drexin
Copy link
Contributor Author

drexin commented Jun 6, 2024

This definitely needs some cleanups and code deduplication, but ready for first review pass.

@@ -338,6 +347,22 @@ void IRGenThunk::emit() {

emission->end();

// FIXME: we shouldn't have to generate all of this. We should just forward
// the value as is
if (auto &error = emission->getTypedErrorExplosion()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is temporary. This should really be a tail call.

@drexin
Copy link
Contributor Author

drexin commented Jun 6, 2024

Please test with following pull request:
swiftlang/llvm-project#8870

@swift-ci smoke test

@drexin
Copy link
Contributor Author

drexin commented Jun 11, 2024

Please test with following pull request:
swiftlang/llvm-project#8870

@swift-ci smoke test

…ssible

rdar://129359355

This PR implements the basic support for returning typed errors directly and applies it to synchronous functions.
@drexin
Copy link
Contributor Author

drexin commented Jun 15, 2024

Please test with following pull request:
swiftlang/llvm-project#8870

@swift-ci smoke test

@drexin
Copy link
Contributor Author

drexin commented Jun 21, 2024

Please test with following pull request:
swiftlang/llvm-project#8870

@swift-ci smoke test

@drexin drexin merged commit 35b2b71 into swiftlang:main Jun 22, 2024
3 checks passed
@drexin drexin deleted the wip-typed-throws-abi branch June 22, 2024 09:35
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Sep 12, 2024
…ws-abi"

This reverts commit 35b2b71, reversing
changes made to c3b57f2.
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