Skip to content

Implement reflection support for Symbolic Extended Existential types. #82389

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrian-prantl
Copy link
Contributor

@adrian-prantl adrian-prantl commented Jun 20, 2025

This patch add a new SymbolicExtendedExistentialTypeRef kind wires it up in TypeDecoder, TypeRefBuilder, TypeLowering, and ASTDemangler. This is tested indirectly via the matching LLDB commit.

EDIT: This is now ready for review!

@adrian-prantl adrian-prantl requested a review from a team as a code owner June 20, 2025 23:58
@adrian-prantl adrian-prantl force-pushed the 153934495 branch 2 times, most recently from 7966da9 to 399dd19 Compare June 27, 2025 00:00
@adrian-prantl adrian-prantl requested a review from rjmccall as a code owner June 27, 2025 00:00
@adrian-prantl adrian-prantl changed the title [WIP] Implement reflection support for Symbolic Extended Existential Implement reflection support for Symbolic Extended Existential types. Jun 27, 2025
@adrian-prantl
Copy link
Contributor Author

@swift-ci test with swiftlang/llvm-project#10915

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10915
@swift-ci test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10915
@swift-ci test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10915
@swift-ci test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10915
@swift-ci test

/*nullable*/ false>;
constexpr size_t buffer_size = sizeof(ExtendedExistentialTypeShapeFlags) +
sizeof(RelativeOffset) +
sizeof(GenericContextDescriptorHeader);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please try:

union {
  TargetExtendedExistentialTypeShape<Runtime> shapeHeader;
};
if (!Reader->readBytes(RemoteAddress(address), reinterpret_cast<uint8_t*>(&shapeHeader), sizeof(shapeHeader))
  return nullptr;

and then you should be able to just use shapeHeader.Flags and shapeHeader.ReqSigHeader without any other fuss.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That didn't work directly because TargetExtendedExistentialTypeShape has no default constructor, but I updated the patch to do achieve something pretty close.

This patch adds a new SymbolicExtendedExistentialTypeRef kind, and
wires it up in TypeDecoder, TypeRefBuilder, TypeLowering, and
ASTDemangler.

This is tested indirectly via the matching LLDB commit.
@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10915
@swift-ci test

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