Exemple #1
0
        private MethodSymbol LoadMethod(
            AggregateSymbol type,
            int[] signature,
            int cMethodTyVars,
            Name methodName,
            ACCESS methodAccess,
            bool isStatic,
            bool isVirtual
            )
        {
            Debug.Assert(signature != null);
            Debug.Assert(cMethodTyVars >= 0);
            Debug.Assert(methodName != null);
            Debug.Assert(type != null);
            TypeArray classTyVars = type.GetTypeVarsAll();

            int   index      = 0;
            CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars);

            Debug.Assert(returnType != null);

            TypeArray argumentTypes = LoadTypeArrayFromSignature(signature, ref index, classTyVars);

            Debug.Assert(argumentTypes != null);

            MethodSymbol ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes);

            if (ret == null)
            {
                RuntimeBinderSymbolTable.AddPredefinedMethodToSymbolTable(type, methodName);
                ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes);
            }
            return(ret);
        }