-
Notifications
You must be signed in to change notification settings - Fork 553
[CoreCLR] Remove unused struct types from CoreCLR host header #10264
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
base: main
Are you sure you want to change the base?
Conversation
@copilot Remove the bundled_assemblies[] variable from src/native/clr/include/xamarin-app.hh and src/native/clr/xamarin-app-stub/application_dso_stub.cc then run the analysis again. |
Completed. Removed the |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@copilot generate a concise commit message, with only the removed types mentioned as a bulleted list |
[CoreCLR] Remove unused struct types from host header Removed types: |
Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
…struct Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
df2b1c2
to
714a1da
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR removes unused struct types from the CoreCLR host header file (
src/native/clr/include/xamarin-app.hh
).Analysis
I systematically analyzed all 26 struct types declared in
xamarin-app.hh
to determine which ones are actually used in the CoreCLR runtime (excluding the header file itself and the stub fileapplication_dso_stub.cc
).Removed Structs
The following struct types were only declared but never used anywhere in the CoreCLR runtime:
BinaryTypeMapHeader
- Declared in debug mode section but not referenced anywhereTypeMapIndexHeader
- Declared in debug mode section but not referenced anywhereVerified as Used (Kept)
All other 24 struct types are properly used in the runtime:
TypeMapEntry
,TypeMapManagedTypeInfo
,TypeMap
,TypeMapAssembly
,TypeMapModuleEntry
,TypeMapModule
,TypeMapJava
,CompressedAssemblyHeader
,CompressedAssemblyDescriptor
,AssemblyStore*
,RuntimeProperty*
,DSOApkEntry
,DSOCacheEntry
,JniRemapping*
,AppEnvironmentVariable
ApplicationConfig
(application_config
),XamarinAndroidBundledAssembly
(bundled_assemblies
),AssemblyStoreRuntimeData
(assembly_store
)Changes
The removed structs exist in the Mono runtime side (
src/native/mono/
) where they are actually used, but they were dead code in the CoreCLR side.Fixes #10263.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.