Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƂ Petryka <35800402+MichalPetryka@users.noreply.github.com>2022-11-11 07:50:14 +0300
committerGitHub <noreply@github.com>2022-11-11 07:50:14 +0300
commit16b28c704108c691c54a73ad845069aac2e3e282 (patch)
treefee9502f5ebb033771e81f040272b1a2a3505566 /src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
parent00e6482544b435c66279ffd7abf43e9a7ead0236 (diff)
Make Type.IsEnum and Type.GetEnumUnderlyingType intrinsics (#71685)
* Make Type.GetTypeCode an intrinsic Makes Type.GetTypeCode a JIT intrinsic for primitive types, enums and strings. Makes Type.IsEnum use intrinsics instead of IsSubclassOf Makes Enum.GetUnderlyingType use Type.GetTypeCode Moves the legacy FCall to InternalGetUnderlyingTypeImpl, so that the non-intrinsic GetTypeCode can use it. Introduces JIT tests checking the generated codegen. * Change IsEnum to an intrinsic * Fallback to the FCall for nint/nuint enums * Fix compilation * Add missing Intrinsic * Add typeof support to IsKnownConstant * Use gtIsTypeHandleToRuntimeTypeHelper * Add __reftype tests * Make more places use gtIsTypeof * Update EnumTests.cs * Add impTypeGetTypeCode to the header * Update EnumGetUnderlyingTypeEnums.il * Make the IsActualEnum helper an intrinsic * Remove GetTypeCode intrinsics * Create a new JIT-EE api, add GetEnumUnderlyingType back * Optimize GetTypeCode with IsKnownConstant * Change the code to make the inliner happy * Handle all types in GetTypeCode * Check for custom types * Fix build, do suggested changes Co-authored-by: Andy Ayers <andya@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Diffstat (limited to 'src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs')
0 files changed, 0 insertions, 0 deletions