diff options
Diffstat (limited to 'src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs index 521a5bf45..f65c5b602 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/SortableDependencyNode.cs @@ -12,7 +12,7 @@ using Internal.TypeSystem; namespace ILCompiler.DependencyAnalysis { - public abstract class SortableDependencyNode : DependencyNodeCore<NodeFactory> + public abstract class SortableDependencyNode : DependencyNodeCore<NodeFactory>, ISortableNode { #if !SUPPORT_JIT /// <summary> @@ -29,10 +29,10 @@ namespace ILCompiler.DependencyAnalysis /// This is really just a number, ideally produced by "new Random().Next(int.MinValue, int.MaxValue)". /// If two manage to conflict (which is pretty unlikely), just make a new one... /// </remarks> - protected internal abstract int ClassCode { get; } - + public abstract int ClassCode { get; } + // Note to implementers: the type of `other` is actually the same as the type of `this`. - protected internal virtual int CompareToImpl(SortableDependencyNode other, CompilerComparer comparer) + public virtual int CompareToImpl(ISortableNode other, CompilerComparer comparer) { throw new NotImplementedException("Multiple nodes of this type are not supported"); } @@ -75,12 +75,18 @@ namespace ILCompiler.DependencyAnalysis BlockReflectionTypeMapNode, StaticsInfoHashtableNode, ReflectionVirtualInvokeMapNode, - ExternalReferencesTableNode, ArrayOfEmbeddedPointersNode, DefaultConstructorMapNode, + ExternalReferencesTableNode, StackTraceEmbeddedMetadataNode, StackTraceMethodMappingNode, - ArrayOfEmbeddedDataNode + ArrayOfEmbeddedDataNode, + WindowsDebugNeedTypeIndicesStoreNode, + WindowsDebugMethodSignatureMapSectionNode, + WindowsDebugTypeSignatureMapSectionNode, + WindowsDebugManagedNativeDictionaryInfoSectionNode, + WindowsDebugTypeRecordsSectionNode, + WindowsDebugPseudoAssemblySectionNode, } public class EmbeddedObjectNodeComparer : IComparer<EmbeddedObjectNode> @@ -159,7 +165,7 @@ namespace ILCompiler.DependencyAnalysis else { Debug.Assert(x.GetType() != y.GetType()); - return codeX - codeY; + return codeY > codeX ? -1 : 1; } } else |