Skip to content

Comments

[vm] fix confusing use of m_pCanonMT (NFC)#102936

Merged
jkotas merged 1 commit intodotnet:mainfrom
lambdageek:clr-cleanup-canonMT
Jun 12, 2024
Merged

[vm] fix confusing use of m_pCanonMT (NFC)#102936
jkotas merged 1 commit intodotnet:mainfrom
lambdageek:clr-cleanup-canonMT

Conversation

@lambdageek
Copy link
Member

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.

`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.
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented Jun 12, 2024

/ba-g infrastructure timeouts

@jkotas jkotas merged commit 1ab6888 into dotnet:main Jun 12, 2024
lambdageek added a commit to lambdageek/runtime that referenced this pull request Jun 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants