Skip to content

ABI: Introduce TargetRelativeProtocolRequirementPointer #29981

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion include/swift/ABI/Metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,16 @@ using TargetRelativeMethodDescriptorPointer =
using RelativeMethodDescriptorPointer =
TargetRelativeMethodDescriptorPointer<InProcess>;

template<typename Runtime> struct TargetProtocolRequirement;

template<typename Runtime>
using TargetRelativeProtocolRequirementPointer =
RelativeIndirectablePointer<const TargetProtocolRequirement<Runtime>,
/*nullable*/ true>;

using RelativeProtocolRequirementPointer =
TargetRelativeProtocolRequirementPointer<InProcess>;

/// An entry in the method override table, referencing a method from one of our
/// ancestor classes, together with an implementation.
template <typename Runtime>
Expand Down Expand Up @@ -2078,7 +2088,7 @@ using GenericBoxHeapMetadata = TargetGenericBoxHeapMetadata<InProcess>;
/// pointer to the protocol requirement descriptor.
template <typename Runtime>
struct TargetResilientWitness {
RelativeIndirectablePointer<TargetProtocolRequirement<Runtime>> Requirement;
TargetRelativeProtocolRequirementPointer<Runtime> Requirement;
RelativeDirectPointer<void> Witness;
};
using ResilientWitness = TargetResilientWitness<InProcess>;
Expand Down