Skip to content

Remove RemoteInspection code to fetch no-longer-used reflection metadata #74394

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

tbkka
Copy link
Contributor

@tbkka tbkka commented Jun 13, 2024

PRs #74145 and #73491 updated RemoteMirror to reflect Multi-Payload Enums (MPEs) without relying on spare bit information in the reflection metadata. This means we can remove the additional metadata that was added in #40906.

This is the first step in such removal. It removes most of the remaining RemoteMirror code for looking up such metadata. It leaves behind:

  • Sufficient stubs for LLDB to continue to build. Once LLDB is updated, these stubs can be removed as well.

  • The compiler code to emit such metadata. This allows new binaries to still reflect MPEs on older runtimes. This will need to be kept for a transitional period.

(This was excerpted from #74230 after discussion there. That will be updated for the tasks above after this lands.)

without relying on spare bit information in the reflection metadata
(which was added in swiftlang#40906).  As a result, we can remove the
code from swiftlang#40906.

This is the first step in such removal.  It removes the RemoteMirror
code for looking up such metadata.  It leaves behind:

* Sufficient stubs for LLDB to continue to build.  Once LLDB is updated, these stubs can be removed as well.

* The compiler code to emit such metadata.  This allows new binaries to still reflect MPEs on older runtimes.  This will need to be kept for a transitional period.
Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

So long, old code!

@tbkka
Copy link
Contributor Author

tbkka commented Jun 13, 2024

@swift-ci Please test

@tbkka tbkka merged commit a1708ef into swiftlang:main Jun 13, 2024
5 checks passed
tbkka added a commit to tbkka/swift that referenced this pull request Jun 14, 2024
PR swiftlang#74394 removed a field from `struct MetadataSections` whose layout is ABI.
So restore that field as an unused padding field to preserve the layout of all
the other fields in that struct.
@tbkka tbkka mentioned this pull request Jun 14, 2024
tbkka added a commit to tbkka/swift that referenced this pull request Jun 14, 2024
…ror-no-more-mpe-metadata-partial"

This reverts commit a1708ef, reversing
changes made to b593062.
@tbkka
Copy link
Contributor Author

tbkka commented Jun 15, 2024

Reverted in #74439 because it broke ABI and resulted in errors in "accessible functions" (which happens to be the linker section immediately after mpenum in several data structures).

meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Jun 20, 2024
PR swiftlang#74394 removed a field from `struct MetadataSections` whose layout is ABI.
So restore that field as an unused padding field to preserve the layout of all
the other fields in that struct.
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Jun 20, 2024
…ror-no-more-mpe-metadata-partial"

This reverts commit a1708ef, reversing
changes made to b593062.
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