protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (DynamicInvokeMethodThunk)other; return(comparer.Compare(_targetSignature, otherMethod._targetSignature)); }
protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) { return(comparer.Compare(ParameterType, ((PointerType)other).ParameterType)); }
protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { throw new NotImplementedException(); }
protected override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer) { var otherField = (InlineArrayField)other; return(comparer.Compare(OwningType, otherField.OwningType)); }
protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { return(CompareTo((DynamicInvokeMethodThunk)other)); }
protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) { return(_signature.CompareTo(((FunctionPointerType)other)._signature, comparer)); }
protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) { // Should be a singleton throw new NotSupportedException(); }
protected abstract int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer);
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_field, ((FieldHandleGenericLookupResult)other)._field)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_type, ((DefaultConstructorLookupResult)other)._type)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_type, ((UnwrapNullableTypeHandleGenericLookupResult)other)._type)); }
protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) { return(comparer.Compare(DelegateType, ((PInvokeDelegateWrapper)other).DelegateType)); }
protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (ForwardDelegateCreationThunk)other; return(comparer.Compare(DelegateType, otherMethod.DelegateType)); }
// Note to implementers: the type of `other` is actually the same as the type of `this`. protected internal abstract int CompareToImpl(MethodDesc other, TypeSystemComparer comparer);
protected override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer) { return(comparer.Compare(_managedField, ((NativeStructField)other)._managedField)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_method, ((MethodDictionaryGenericLookupResult)other)._method)); }
public IEnumerable <IMethodNode> GetCompiledMethods(EcmaModule moduleToEnumerate, CompiledMethodCategory methodCategory) { lock (_methodsGenerated) { if (!_sortedMethods) { TypeSystemComparer comparer = new TypeSystemComparer(); Comparison <IMethodNode> sortHelper = (x, y) => comparer.Compare(x.Method, y.Method); List <PerModuleMethodsGenerated> perModuleDatas = new List <PerModuleMethodsGenerated>(_methodsGenerated.Values); perModuleDatas.Sort((x, y) => x.Module.CompareTo(y.Module)); foreach (var perModuleData in perModuleDatas) { perModuleData.MethodsGenerated.Sort(sortHelper); perModuleData.GenericMethodsGenerated.Sort(sortHelper); _completeSortedMethods.AddRange(perModuleData.MethodsGenerated); _completeSortedMethods.AddRange(perModuleData.GenericMethodsGenerated); _completeSortedGenericMethods.AddRange(perModuleData.GenericMethodsGenerated); } _sortedMethods = true; } } if (moduleToEnumerate == null) { if (methodCategory == CompiledMethodCategory.All) { return(_completeSortedMethods); } else if (methodCategory == CompiledMethodCategory.Instantiated) { return(_completeSortedGenericMethods); } else { // This isn't expected to be needed, and thus isn't implemented throw new ArgumentException(); } } else if (_methodsGenerated.TryGetValue(moduleToEnumerate, out var perModuleData)) { if (methodCategory == CompiledMethodCategory.All) { return(GetCompiledMethodsAllMethodsInModuleHelper(moduleToEnumerate)); } if (methodCategory == CompiledMethodCategory.Instantiated) { return(perModuleData.GenericMethodsGenerated); } else { Debug.Assert(methodCategory == CompiledMethodCategory.NonInstantiated); return(perModuleData.MethodsGenerated); } } else { return(Array.Empty <IMethodNode>()); } }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_method, ((VirtualResolveGenericLookupResult)other)._method)); }
protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (PInvokeTargetNativeMethod)other; return(comparer.Compare(_declMethod, otherMethod._declMethod)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_type, ((TypeNonGCStaticBaseGenericLookupResult)other)._type)); }
protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (EnumEqualsThunk)other; return(comparer.Compare(_owningType, otherMethod._owningType)); }
public Comparer(TypeSystemComparer comparer) { _comparer = comparer; }
protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (DelegateGetThunkMethodOverride)other; return(comparer.Compare(_delegateInfo.Type, otherMethod._delegateInfo.Type)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_type, ((ArrayAllocatorGenericLookupResult)other)._type)); }
protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { var otherMethod = (CalliMarshallingMethodThunk)other; return(comparer.Compare(_targetSignature, otherMethod._targetSignature)); }
protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return(comparer.Compare(_type, ((ThreadStaticOffsetLookupResult)other)._type)); }
internal int CompareTo(GCStaticDescNode other, TypeSystemComparer comparer) { var compare = _isThreadStatic.CompareTo(other._isThreadStatic); return(compare != 0 ? compare : comparer.Compare(_type, other._type)); }
protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) { return(comparer.Compare(ManagedStructType, ((NativeStructType)other).ManagedStructType)); }
protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) { // Should be a singleton Debug.Assert(this == other); return(0); }
protected override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer) { return(_symbolName.CompareTo(((ExternSymbolMappedField)other)._symbolName)); }