diff options
author | MichaĆ Petryka <35800402+MichalPetryka@users.noreply.github.com> | 2022-11-11 07:50:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 07:50:14 +0300 |
commit | 16b28c704108c691c54a73ad845069aac2e3e282 (patch) | |
tree | fee9502f5ebb033771e81f040272b1a2a3505566 /src/coreclr/tools/Common/TypeSystem/IL/Stubs/PInvokeILEmitter.cs | |
parent | 00e6482544b435c66279ffd7abf43e9a7ead0236 (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/IL/Stubs/PInvokeILEmitter.cs')
0 files changed, 0 insertions, 0 deletions