-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[cdac][.NET9] Data descriptor changes for GetMethodDescData #106417
Conversation
Tagging subscribers to this area: @mangod9 |
@jkotas @AaronRobinsonMSFT @davidwrighton @elinor-fung please help reviewing this PR. @lambdageek has requested that I wait for it before the RC1 snap if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update any markdown?
@@ -332,7 +332,7 @@ class LoaderAllocator | |||
bool m_fTerminated; | |||
bool m_fMarked; | |||
int m_nGCCount; | |||
bool m_IsCollectible; | |||
BYTE m_IsCollectible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BYTE m_IsCollectible; | |
const BYTE m_IsCollectible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it turns out we can't make m_IsCollectible
const
. The reason is because LoaderAllocator
is a DAC-ized base class and the VPTR_BASE_VTABLE_CLASS
macro adds a LoaderAllocator(TADDR addr, TADDR vtAddr) {}
constructor which doesn't include an initializer for m_IsCollectible
which results in a compilation error:
E:\dotnet-runtime\runtime-m\src\coreclr\vm\loaderallocator.hpp(291): error C2789: 'LoaderAllocator::m_IsCollectible'
: an object of const-qualified type must be initialized
E:\dotnet-runtime\runtime-m\src\coreclr\vm\loaderallocator.hpp(335): note: see declaration of 'LoaderAllocator::m_Is
Collectible'
Not for this portion - this is the data descriptors (and the new struct/global in runtime to better represent needed data), not tied to contracts yet. |
@@ -662,4 +662,55 @@ BOOL DoesSlotCallPrestub(PCODE pCode) | |||
return FALSE; | |||
} | |||
|
|||
PrecodeMachineDescriptor g_PrecodeMachineDescriptor; | |||
|
|||
void PrecodeMachineDescriptor::Init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there an Init routine as well as a set of non-static data member initializers here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to delete the initializers, that was an idea that didn't work out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you doing this before you want this checked in? Given the snap deadline, I think we should probably miss it, and do a backport of the data descriptors when we're ready in reality to declare that .NET 9 might actually be useable with the cDAC and CLRMA. In general, I'm leery of stuff that has a static initializer, and that's what we have here now, and I don't see us fixing this before the snap happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, let's miss the snap. I can't fix and validate this in the next couple hours
@carlossanlop I'm going to close this and do a back port after the snap, it needs more work |
Extracted from #106413
The main new thing here is a
PrecodeMachineDescriptor
struct and global: this is used to copy out theenum
values and masks that show how to manipulate precode stubs to figure out what kind of a stub we're looking at.Contributes to #99302