Skip to content

[lldb] Factor out iteration over runtime types from GetChildCompilerT… #10607

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

adrian-prantl
Copy link

…ypeAtIndex()

This patch introduces a new class SwiftRuntimeTypeVisitor that exists
to unify iteration over runtime type information. The visitor callback
has closure parameters that can be called to make additional expensive
queries on a child.

TODO: This is not the final evolution step.

  • We probably should remove the "depth" parameter entirely and implement the access path computation for GetIndexOfChildMemberWithName at a different layer.

  • We could cache the results for the last execution context.

Relanding with an off-by-one error fixed in
GetExistentialSyntheticChildren that was caught by ASAN!

@adrian-prantl adrian-prantl requested a review from a team as a code owner May 1, 2025 23:20
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

…ypeAtIndex()

This patch introduces a new class SwiftRuntimeTypeVisitor that exists
to unify iteration over runtime type information. The visitor callback
has closure parameters that can be called to make additional expensive
queries on a child.

TODO: This is not the final evolution step.

- We probably should remove the "depth" parameter entirely and implement the access path computation for GetIndexOfChildMemberWithName at a different layer.

- We could cache the results for the last execution context.

Relanding with an off-by-one error fixed in
GetExistentialSyntheticChildren that was caught by ASAN!
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 0a257a1 into swiftlang:swift/release/6.2 May 2, 2025
3 checks passed
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