Speed up typeof (#85962)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tue, 9 May 2023 19:25:08 +0000 (04:25 +0900)
committerGitHub <noreply@github.com>
Tue, 9 May 2023 19:25:08 +0000 (12:25 -0700)
commit5b62e27e914a0067d85a24545b1013fa8b39b204
tree44b83dc2a538ae2a5342511696bbe5445983ba66
parentb92c1d23c1ad75d72f947c3e7fff5e9b73bd9cb5
Speed up typeof (#85962)

Saw it in BasicMinimalApi profiles. The ultimate fix is to make `RuntimeType` a frozen object, but this will do for now.

Also made a bit of progress in eradicating `EETypePtr` while I'm touching this.
13 files changed:
src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs
src/coreclr/nativeaot/Runtime/inc/MethodTable.h
src/coreclr/nativeaot/Runtime/inc/MethodTable.inl
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/LdTokenHelpers.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SynchronizedMethodHelpers.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Object.NativeAot.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Type.NativeAot.cs
src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs
src/coreclr/tools/Common/Internal/Runtime/MethodTable.Constants.cs
src/libraries/System.Private.CoreLib/src/System/Nullable.cs