[vm] fix confusing use of m_pCanonMT (NFC)#102936
Merged
jkotas merged 1 commit intodotnet:mainfrom Jun 12, 2024
Merged
Conversation
`m_pCanonMT` and `m_pEEClass` are union members so they're the same value where the lowest bit is used as a flag to indicate which one you have. In a canonical method table, you always have `m_pEEClass`. `m_pEEClass` has the lowest bit cleared. So to get the actual pointer, just return it. This just cleans up hard to read code, there is no functional change at runtime.
Contributor
|
Tagging subscribers to this area: @mangod9 |
jkotas
approved these changes
Jun 12, 2024
Member
|
/ba-g infrastructure timeouts |
lambdageek
added a commit
to lambdageek/runtime
that referenced
this pull request
Jun 27, 2024
This reverts commit 1ab6888. The change broke the DAC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
m_pCanonMTandm_pEEClassare union members so they're the same value where the lowest bit is used as a flag to indicate which one you have. In a canonical method table, you always havem_pEEClass.m_pEEClasshas the lowest bit cleared. So to get the actual pointer, just return it.This just cleans up hard to read code, there is no functional change at runtime.