-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Improve metadata perf and refactor ilasm/ildasm metadata usage #25144
Improve metadata perf and refactor ilasm/ildasm metadata usage #25144
Conversation
@@ -8,7 +8,6 @@ add_definitions(-D__ILASM__) | |||
add_definitions(-DFEATURE_CORECLR) | |||
|
|||
include_directories(.) | |||
include_directories(../ildasm/unixcoreclrloader) |
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.
Delete everything in unixcoreclrloader directory?
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.
Yeah, I need to do that before checkin, as well as change the IMDInternalImport guid, so nobody gets burned with invalid vtable dispatches on this change if they do something like use a dbi with a non-compatible dac. This is still WIP, as while I managed to get the Windows build to be workable, the Linux/Mac build is broken.
src/ildasm/dasm.cpp
Outdated
@@ -308,32 +307,17 @@ extern CQuickBytes * g_szBuf_JUMPPT; | |||
extern CQuickBytes * g_szBuf_UnquotedProperName; | |||
extern CQuickBytes * g_szBuf_ProperName; | |||
|
|||
#ifdef FEATURE_PAL | |||
CoreCLRLoader *g_loader; | |||
#endif | |||
MetaDataGetDispenserFunc metaDataGetDispenser; |
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.
Nit: These vars are not needed anymore. Can just call directly.
src/ilasm/CMakeLists.txt
Outdated
) | ||
else() | ||
list(APPEND ILASM_LINK_LIBRARIES | ||
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available |
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.
This ${START_WHOLE_ARCHIVE} should not be needed. Only the coreclr needs this as it exports symbols, some of which are from PAL.
src/ildasm/exe/CMakeLists.txt
Outdated
) | ||
else() | ||
list(APPEND ILDASM_LINK_LIBRARIES | ||
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available |
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.
Dtto here
- Move enumerator functions to be directly implemented instead of relying on COM/vtable dispatch - Delete unused functions - Replace TypeDef enumeration logic to be the same as the general case Build metadata into ildasm and ilasm instead of referencing coreclr - SHA1Hash class moved to utilcode - careful detachment of bindings between metadata and runtime - Able to reuse wks build of metadata logic for ilasm/ildasm
f7df3ec
to
4805160
Compare
- Remove unnecessary function pointer indirection - Update guid of IMDInternalImport as the api has changed
src/md/staticmd/apis.cpp
Outdated
// %%Function: MetaDataGetDispenser | ||
// This function gets the Dispenser interface given the CLSID and REFIID. | ||
// --------------------------------------------------------------------------- | ||
STDAPI DLLEXPORT MetaDataGetDispenser( // Return HRESULT |
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.
comment alignment
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.
We reviewed this together.
Looks Good
…t/coreclr#25144) * Optimize enumeration in IMDInternal - Move enumerator functions to be directly implemented instead of relying on COM/vtable dispatch - Delete unused functions - Replace TypeDef enumeration logic to be the same as the general case - Update guid of IMDInternalImport as the api has changed Build metadata into ildasm and ilasm instead of referencing coreclr - SHA1Hash class moved to utilcode - careful detachment of bindings between metadata and runtime - Able to reuse wks build of metadata logic for ilasm/ildasm Commit migrated from dotnet/coreclr@ef7767a
This change currently conflates 2 change