Avoid TypeSpec resolution when checking for IsValueType (#80842)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 20 Jan 2023 03:56:12 +0000 (12:56 +0900)
committerGitHub <noreply@github.com>
Fri, 20 Jan 2023 03:56:12 +0000 (12:56 +0900)
commit89352bba5e441f093e8e63a8a8c0624c3f91c5a8
treef79d792e46ab6a202fecd41c9725a124aa95e913
parent1cfa5881f179847f93bdd5852b89b96d6ae2ccec
Avoid TypeSpec resolution when checking for IsValueType (#80842)

This creates a much narrower path to get base type of a type that doesn't bring in complete support for token resolution. IsValueType and IsEnum that call into this are very common.
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/QHandles.NativeFormat.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeResolver.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs
src/tests/nativeaot/SmokeTests/Reflection/Reflection.cs