Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete IsIntrinsicWorkaround #45656

Merged
merged 1 commit into from
Dec 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
}