-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[RemoteMirror] Get spare bit info from reflection records #40906
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
[RemoteMirror] Get spare bit info from reflection records #40906
Conversation
59273d7
to
7663f5f
Compare
7663f5f
to
2210d22
Compare
@swift-ci Please test |
Build failed |
Build failed |
b0b49f2
to
3558747
Compare
@swift-ci Please test |
@swift-ci Please test Windows platform |
5 similar comments
@swift-ci Please test Windows platform |
@swift-ci Please test Windows platform |
@swift-ci Please test Windows platform |
@swift-ci Please test Windows platform |
@swift-ci Please test Windows platform |
@swift-ci Please test Linux platform |
I added a bunch of
That information makes no sense. It's skipped one word so far, but MPE records are always at least two words. And the second word is My only guess is that this is not really a MultiPayloadEnum section at all. But staring at the source code isn't illuminating anything for me. |
@compnerd - Any thoughts on this? Another possibility that just occurred to me: Maybe on Windows, we get some extra data at the front of these sections? (This is probably the first reflection record type that's variably-sized, so it's almost conceivable that other reflection sections wouldn't be messed-up by extra bytes here.) |
Build failed |
@swift-ci Please test macOS Platform |
@swift-ci Please test |
Build failed |
@swift-ci Please test |
@swift-ci Please test |
@swift-ci Please test |
@swift-ci Please test Windows |
…a/swift into tbkka-remoteMirror-MPE-spareBits-v2
@swift-ci Please test |
This means that if we don't have compiler information for a type that has an enum in it somewhere, we'll refuse to project the enum value because we don't know that we can do it correctly. Also, disable the comparison of compiler-provided vs. locally-computed masks for this case until this is fixed.
@swift-ci Please test |
…ror-MPE-spareBits-v2
@swift-ci Please test |
The definitions for all reflection sections are now part of llvm-project. Now that swiftlang/llvm-project#3966 has landed, this should build and run cleanly. |
@swift-ci Please test |
…ion metadata This mostly reverts "[RemoteMirror] Get spare bit info from reflection records (swiftlang#40906)" I recently figured out that RemoteMirror can compute all the spare bit data directly without requiring this information. So let's remove it to save some space in binaries. This mostly reverts commit 4d91b45.
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.
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.
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. (cherry picked from commit c20ef6d)
This adds a new reflection record type carrying spare bit information for multi-payload enums.
The compiler includes this for any type that might need it in order to accurately reflect the contents of the enum. The RemoteMirror library will use this if present to determine how to project the contents of the enum. If not present (for example, in older binaries), the RemoteMirror library falls back on an internal calculation of the spare bitmask.
Resolves rdar://61158214