From 4e16e2f68d89798b7145a28101b83a5282be12fa Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 6 Dec 2020 11:33:18 -0800 Subject: [PATCH] Delete IsIntrinsicWorkaround (#45656) --- .../IL/ReadyToRunILProvider.cs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs index 77d5987771ef8..46ec240cba14e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs @@ -10,8 +10,6 @@ namespace Internal.IL { - using Workarounds; - public sealed class ReadyToRunILProvider : ILProvider { private MethodIL TryGetIntrinsicMethodILForActivator(MethodDesc method) @@ -99,7 +97,7 @@ public override MethodIL GetMethodIL(MethodDesc method) { if (method is EcmaMethod ecmaMethod) { - if (method.IsIntrinsicWorkaround()) + if (method.IsIntrinsic) { MethodIL result = TryGetIntrinsicMethodIL(method); if (result != null) @@ -115,7 +113,7 @@ public override MethodIL GetMethodIL(MethodDesc method) else if (method is MethodForInstantiatedType || method is InstantiatedMethod) { // Intrinsics specialized per instantiation - if (method.IsIntrinsicWorkaround()) + if (method.IsIntrinsic) { MethodIL methodIL = TryGetPerInstantiationIntrinsicMethodIL(method); if (methodIL != null) @@ -134,16 +132,3 @@ public override MethodIL GetMethodIL(MethodDesc method) } } } - -namespace Internal.IL.Workarounds -{ - static class IntrinsicExtensions - { - // We should ideally mark interesting methods a [Intrinsic] to avoid having to - // name match everything in CoreLib. - public static bool IsIntrinsicWorkaround(this MethodDesc method) - { - return method.OwningType is MetadataType mdType && mdType.Module == method.Context.SystemModule; - } - } -}