Skip to content

Commit

Permalink
Delete IsIntrinsicWorkaround (#45656)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas authored Dec 6, 2020
1 parent f9a4fbf commit 4e16e2f
Showing 1 changed file with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

namespace Internal.IL
{
using Workarounds;

public sealed class ReadyToRunILProvider : ILProvider
{
private MethodIL TryGetIntrinsicMethodILForActivator(MethodDesc method)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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;
}
}
}

0 comments on commit 4e16e2f

Please sign in to comment.