Ejemplo n.º 1
0
        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)
        {
            NewArrayFixupSignature otherNode = (NewArrayFixupSignature)other;
            int result = comparer.Compare(_arrayType, otherNode._arrayType);

            if (result != 0)
            {
                return(result);
            }

            return(_signatureContext.CompareTo(otherNode._signatureContext, comparer));
        }
Ejemplo n.º 3
0
        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            StringImportSignature otherNode = (StringImportSignature)other;
            int result = _signatureContext.CompareTo(otherNode._signatureContext, comparer);

            if (result != 0)
            {
                return(result);
            }

            return(_token.CompareTo(otherNode._token));
        }
Ejemplo n.º 4
0
        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            MethodWithGCInfo otherNode = (MethodWithGCInfo)other;
            int result = comparer.Compare(_method, otherNode._method);

            if (result != 0)
            {
                return(result);
            }

            return(SignatureContext.CompareTo(otherNode.SignatureContext, comparer));
        }
Ejemplo n.º 5
0
        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            FieldFixupSignature otherNode = (FieldFixupSignature)other;
            int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);

            if (result != 0)
            {
                return(result);
            }

            result = comparer.Compare(_fieldDesc, otherNode._fieldDesc);
            if (result != 0)
            {
                return(result);
            }

            return(_signatureContext.CompareTo(otherNode._signatureContext, comparer));
        }
Ejemplo n.º 6
0
        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            TypeFixupSignature otherNode = (TypeFixupSignature)other;
            int result = _fixupKind.CompareTo(otherNode._fixupKind);

            if (result != 0)
            {
                return(result);
            }

            result = comparer.Compare(_typeDesc, otherNode._typeDesc);
            if (result != 0)
            {
                return(result);
            }

            return(_signatureContext.CompareTo(otherNode._signatureContext, comparer));
        }
Ejemplo n.º 7
0
        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.Method, otherNode._targetMethod.Method);
            if (result != 0)
            {
                return(result);
            }

            result = _methodToken.CompareTo(otherNode._methodToken);
            if (result != 0)
            {
                return(result);
            }

            return(_signatureContext.CompareTo(otherNode._signatureContext, comparer));
        }
Ejemplo n.º 8
0
        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            DelayLoadHelperMethodImport otherNode = (DelayLoadHelperMethodImport)other;
            int result = _useInstantiatingStub.CompareTo(otherNode._useInstantiatingStub);

            if (result != 0)
            {
                return(result);
            }

            result = _signatureContext.CompareTo(otherNode._signatureContext, comparer);
            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)
        {
            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));
        }