Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs
index 7b941ec85..76f4785a4 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ReadyToRunHelperNode.cs
@@ -80,16 +80,24 @@ namespace ILCompiler.DependencyAnalysis
}
break;
case ReadyToRunHelperId.VirtualCall:
+ case ReadyToRunHelperId.ResolveVirtualFunction:
{
// Make sure we aren't trying to callvirt Object.Finalize
MethodDesc method = (MethodDesc)target;
if (method.IsFinalizer)
ThrowHelper.ThrowInvalidProgramException(ExceptionStringID.InvalidProgramCallVirtFinalize, method);
+
+ // Method should be in fully canonical form. Otherwise we're being wasteful and generate more
+ // helpers than needed.
+ Debug.Assert(!method.IsCanonicalMethod(CanonicalFormKind.Any) ||
+ method.GetCanonMethodTarget(CanonicalFormKind.Specific) == method);
}
break;
}
}
+ protected override bool IsVisibleFromManagedCode => false;
+
protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler);
public ReadyToRunHelperId Id => _id;
@@ -221,9 +229,9 @@ namespace ILCompiler.DependencyAnalysis
}
#if !SUPPORT_JIT
- protected internal override int ClassCode => -911637948;
+ public override int ClassCode => -911637948;
- protected internal override int CompareToImpl(SortableDependencyNode other, CompilerComparer comparer)
+ public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
{
var compare = _id.CompareTo(((ReadyToRunHelperNode)other)._id);
if (compare != 0)