Split `TryGetGenericMethodComponents` into two overloads (#84156)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 31 Mar 2023 08:06:14 +0000 (17:06 +0900)
committerGitHub <noreply@github.com>
Fri, 31 Mar 2023 08:06:14 +0000 (17:06 +0900)
commit9c0d9cd9cb0d38978bfffd3c8c43f0156cc7f3a2
tree930642aef77445632bab8fe4aa57d17bc41a9963
parent9744bf9e3d1822ec7f0fa8750dc8f8d165acc0f8
Split `TryGetGenericMethodComponents` into two overloads (#84156)

Resolves #83069. Hello World is now 1.45 MB, down from 1.65 MB.

Half of the callers don't care about the `MethodNameAndSignature` part - don't spend time computing it.

This also allows trimming `MethodNameAndSignature` from a hello world, which allows trimming pretty much all of the type loader.
src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs
src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs
src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs
src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.Metadata.cs
src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.SignatureParsing.cs
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs