public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { VirtualResolutionFixupSignature otherNode = (VirtualResolutionFixupSignature)other; int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind); if (result != 0) { return(result); } result = comparer.Compare(_implType, otherNode._implType); if (result != 0) { return(result); } result = _declMethod.CompareTo(otherNode._declMethod, comparer); if (result != 0) { return(result); } // Handle null _implMethod scenario if (_implMethod == otherNode._implMethod) { return(0); } return(_implMethod.CompareTo(otherNode._implMethod, comparer)); }
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { MethodFixupSignature otherNode = (MethodFixupSignature)other; int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind); if (result != 0) { return(result); } result = _isUnboxingStub.CompareTo(otherNode._isUnboxingStub); if (result != 0) { return(result); } result = _isInstantiatingStub.CompareTo(otherNode._isInstantiatingStub); if (result != 0) { return(result); } result = _method.CompareTo(otherNode._method, comparer); if (result != 0) { return(result); } return(_signatureContext.CompareTo(otherNode._signatureContext, comparer)); }
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { DelayLoadHelperMethodImport otherNode = (DelayLoadHelperMethodImport)other; int result = _useInstantiatingStub.CompareTo(otherNode._useInstantiatingStub); if (result != 0) { return(result); } result = _method.CompareTo(otherNode._method, comparer); if (result != 0) { return(result); } return(base.CompareToImpl(other, comparer)); }
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { DelegateCtorSignature otherNode = (DelegateCtorSignature)other; int result = comparer.Compare(_delegateType, otherNode._delegateType); if (result != 0) { return(result); } result = comparer.Compare(_targetMethod, otherNode._targetMethod); if (result != 0) { return(result); } return(_methodToken.CompareTo(otherNode._methodToken, comparer)); }
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { GenericLookupSignature otherNode = (GenericLookupSignature)other; int result = ((int)_runtimeLookupKind).CompareTo((int)otherNode._runtimeLookupKind); if (result != 0) { return(result); } result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind); if (result != 0) { return(result); } if (_typeArgument != null || otherNode._typeArgument != null) { if (_typeArgument == null) { return(-1); } if (otherNode._typeArgument == null) { return(1); } result = comparer.Compare(_typeArgument, otherNode._typeArgument); if (result != 0) { return(result); } } if (_fieldArgument != null || otherNode._fieldArgument != null) { if (_fieldArgument == null) { return(-1); } if (otherNode._fieldArgument == null) { return(1); } result = comparer.Compare(_fieldArgument, otherNode._fieldArgument); if (result != 0) { return(result); } } if (_methodArgument != null || otherNode._methodArgument != null) { if (_methodArgument == null) { return(-1); } if (otherNode._methodArgument == null) { return(1); } result = _methodArgument.CompareTo(otherNode._methodArgument, comparer); if (result != 0) { return(result); } } var contextAsMethod = _methodContext.Context as MethodDesc; var otherContextAsMethod = otherNode._methodContext.Context as MethodDesc; if (contextAsMethod != null || otherContextAsMethod != null) { if (contextAsMethod == null) { return(-1); } if (otherContextAsMethod == null) { return(1); } return(comparer.Compare(contextAsMethod, otherContextAsMethod)); } else { return(comparer.Compare(_methodContext.ContextType, otherNode._methodContext.ContextType)); } }
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { GenericLookupSignature otherNode = (GenericLookupSignature)other; int result = _runtimeLookupKind.CompareTo(otherNode._runtimeLookupKind); if (result != 0) { return(result); } result = _fixupKind.CompareTo(otherNode._fixupKind); if (result != 0) { return(result); } if (_typeArgument != null || otherNode._typeArgument != null) { if (_typeArgument == null) { return(-1); } if (otherNode._typeArgument == null) { return(1); } result = comparer.Compare(_typeArgument, otherNode._typeArgument); if (result != 0) { return(result); } } if (_fieldArgument != null || otherNode._fieldArgument != null) { if (_fieldArgument == null) { return(-1); } if (otherNode._fieldArgument == null) { return(1); } result = comparer.Compare(_fieldArgument, otherNode._fieldArgument); if (result != 0) { return(result); } } if (_methodArgument != null || otherNode._methodArgument != null) { if (_methodArgument == null) { return(-1); } if (otherNode._methodArgument == null) { return(1); } result = _methodArgument.CompareTo(otherNode._methodArgument, comparer); if (result != 0) { return(result); } } result = comparer.Compare(_methodContext.ContextMethod, otherNode._methodContext.ContextMethod); if (result != 0) { return(result); } return(_signatureContext.CompareTo(otherNode._signatureContext, comparer)); }