Skip to content

Conversation

@DougGregor
Copy link
Member

Introduce name mangling and runtime metadata support for typed throws

The layout is the same, but this eliminates the handwritten address
computations.
…tadata

Extend function type metadata with an entry for the thrown error type,
so that thrown error types are represented at runtime as well. Note
that this required the introduction of "extended" function type
flags into function type metadata, because we would have used the last
bit. Do so, and define one extended flag bit as representing typed
throws.

Add `swift_getExtendedFunctionTypeMetadata` to the runtime to build
function types that have the extended flags and a thrown error type.
Teach IR generation to call this function to form the metadata, when
appropriate.

Introduce all of the runtime mangling/demangling support needed for
thrown error types.
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor mentioned this pull request Oct 29, 2023
21 tasks
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit 7db7b21 into swiftlang:main Oct 30, 2023
@DougGregor DougGregor deleted the typed-throws-runtime branch October 30, 2023 01:17
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.

1 participant