You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
0 commit comments