Example #1
0
 public CMethodIterator(CSemanticChecker checker, SymbolLoader symLoader, Name name, TypeArray containingTypes, CType @object, CType qualifyingType, Declaration context, bool allowBogusAndInaccessible, bool allowExtensionMethods, int arity, EXPRFLAG flags, symbmask_t mask)
 {
     Debug.Assert(name != null);
     Debug.Assert(symLoader != null);
     Debug.Assert(checker != null);
     Debug.Assert(containingTypes != null);
     _pSemanticChecker = checker;
     _pSymbolLoader = symLoader;
     _pCurrentType = null;
     _pCurrentSym = null;
     _pName = name;
     _pContainingTypes = containingTypes;
     _pQualifyingType = qualifyingType;
     _pContext = context;
     _bAllowBogusAndInaccessible = allowBogusAndInaccessible;
     _bAllowExtensionMethods = allowExtensionMethods;
     _nArity = arity;
     _flags = flags;
     _mask = mask;
     _nCurrentTypeCount = 0;
     _bIsCheckingInstanceMethods = true;
     _bAtEnd = false;
     _bCurrentSymIsBogus = false;
     _bCurrentSymIsInaccessible = false;
     _bcanIncludeExtensionsInResults = _bAllowExtensionMethods;
     _bEndIterationAtCurrentExtensionList = false;
 }
Example #2
0
 public CMethodIterator GetMethodIterator(
     CSemanticChecker pChecker, SymbolLoader pSymLoader, CType pObject, CType pQualifyingType, Declaration pContext, bool allowBogusAndInaccessible, bool allowExtensionMethods, int arity, EXPRFLAG flags, symbmask_t mask)
 {
     Debug.Assert(pSymLoader != null);
     CMethodIterator iterator = new CMethodIterator(pChecker, pSymLoader, _pName, ContainingTypes, pObject, pQualifyingType, pContext, allowBogusAndInaccessible, allowExtensionMethods, arity, flags, mask);
     return iterator;
 }
Example #3
0
 public CMethodIterator(CSemanticChecker checker, SymbolLoader symLoader, Name name, TypeArray containingTypes, CType @object, CType qualifyingType, AggregateDeclaration context, bool allowBogusAndInaccessible, bool allowExtensionMethods, int arity, EXPRFLAG flags, symbmask_t mask)
 {
     Debug.Assert(name != null);
     Debug.Assert(symLoader != null);
     Debug.Assert(checker != null);
     Debug.Assert(containingTypes != null);
     _pSemanticChecker           = checker;
     _pSymbolLoader              = symLoader;
     _pCurrentType               = null;
     _pCurrentSym                = null;
     _pName                      = name;
     _pContainingTypes           = containingTypes;
     _pQualifyingType            = qualifyingType;
     _pContext                   = context;
     _bAllowBogusAndInaccessible = allowBogusAndInaccessible;
     _nArity                     = arity;
     _flags                      = flags;
     _mask = mask;
     _nCurrentTypeCount          = 0;
     _bIsCheckingInstanceMethods = true;
     _bAtEnd                              = false;
     _bCurrentSymIsBogus                  = false;
     _bCurrentSymIsInaccessible           = false;
     _bcanIncludeExtensionsInResults      = allowExtensionMethods;
     _bEndIterationAtCurrentExtensionList = false;
 }
Example #4
0
        public Symbol LookupSym(Name name, ParentSymbol parent, symbmask_t kindmask)
        {
            Key    k = new Key(name, parent);
            Symbol sym;

            if (_dictionary.TryGetValue(k, out sym))
            {
                return(FindCorrectKind(sym, kindmask));
            }

            return(null);
        }
Example #5
0
        public Symbol LookupSym(Name name, ParentSymbol parent, symbmask_t kindmask)
        {
            Key k = new Key(name, parent);
            Symbol sym;

            if (_dictionary.TryGetValue(k, out sym))
            {
                return FindCorrectKind(sym, kindmask);
            }

            return null;
        }
Example #6
0
        private static Symbol FindCorrectKind(Symbol sym, symbmask_t kindmask)
        {
            do
            {
                if ((kindmask & sym.mask()) != 0)
                {
                    return(sym);
                }
                sym = sym.nextSameName;
            } while (sym != null);

            return(null);
        }
Example #7
0
        public Symbol nextSameName; // next child of this parent with same name.

        public Symbol LookupNext(symbmask_t kindmask)
        {
            // Keep traversing the list of symbols with same name and parent.
            for (Symbol sym = nextSameName; sym != null; sym = sym.nextSameName)
            {
                if ((kindmask & sym.mask()) != 0)
                {
                    return(sym);
                }
            }

            return(null);
        }
Example #8
0
        private static Symbol FindCorrectKind(Symbol sym, symbmask_t kindmask)
        {
            do
            {
                if ((kindmask & sym.mask()) != 0)
                {
                    return sym;
                }
                sym = sym.nextSameName;
            } while (sym != null);

            return null;
        }
Example #9
0
            public CMethodIterator(Name name, TypeArray containingTypes, CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments)
            {
                Debug.Assert(name != null);
                Debug.Assert(containingTypes != null);
                Debug.Assert(containingTypes.Count != 0);

                _name                      = name;
                _containingTypes           = containingTypes;
                _qualifyingType            = qualifyingType;
                _context                   = context;
                _arity                     = arity;
                _flags                     = flags;
                _mask                      = mask;
                _nonTrailingNamedArguments = nonTrailingNamedArguments;
            }
 public CMethodIterator(CSemanticChecker checker, SymbolLoader symLoader, Name name, TypeArray containingTypes, CType qualifyingType, AggregateDeclaration context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments)
 {
     Debug.Assert(name != null);
     Debug.Assert(symLoader != null);
     Debug.Assert(checker != null);
     Debug.Assert(containingTypes != null);
     Debug.Assert(containingTypes.Count != 0);
     _semanticChecker           = checker;
     _symbolLoader              = symLoader;
     _name                      = name;
     _containingTypes           = containingTypes;
     _qualifyingType            = qualifyingType;
     _context                   = context;
     _arity                     = arity;
     _flags                     = flags;
     _mask                      = mask;
     _nonTrailingNamedArguments = nonTrailingNamedArguments;
 }
Example #11
0
        public static Symbol LookupNextSym(Symbol sym, ParentSymbol parent, symbmask_t kindmask)
        {
            Debug.Assert(sym.parent == parent);

            sym = sym.nextSameName;
            Debug.Assert(sym == null || sym.parent == parent);

            // Keep traversing the list of symbols with same name and parent.
            while (sym != null)
            {
                if ((kindmask & sym.mask()) > 0)
                {
                    return(sym);
                }

                sym = sym.nextSameName;
                Debug.Assert(sym == null || sym.parent == parent);
            }

            return(null);
        }
Example #12
0
 public static Symbol LookupNextSym(Symbol sym, ParentSymbol parent, symbmask_t kindmask)
 => BSYMMGR.LookupNextSym(sym, parent, kindmask);
Example #13
0
 public static Symbol LookupAggMember(Name name, AggregateSymbol agg, symbmask_t mask) => SymbolStore.LookupSym(name, agg, mask);
Example #14
0
 public Symbol LookupAggMember(Name name, AggregateSymbol agg, symbmask_t mask)
 {
     return(tableGlobal.LookupSym(name, agg, mask));
 }
Example #15
0
 public Symbol LookupGlobalSymCore(Name name, ParentSymbol parent, symbmask_t kindmask)
 {
     return(tableGlobal.LookupSym(name, parent, kindmask));
 }
        public CMethodIterator GetMethodIterator(
            CSemanticChecker pChecker, SymbolLoader pSymLoader, CType pQualifyingType, AggregateDeclaration pContext, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments)
        {
            Debug.Assert(pSymLoader != null);
            CMethodIterator iterator = new CMethodIterator(pChecker, pSymLoader, _pName, ContainingTypes, pQualifyingType, pContext, arity, flags, mask, nonTrailingNamedArguments);

            return(iterator);
        }
 public static Symbol LookupSym(Name name, ParentSymbol parent, symbmask_t kindmask)
 {
     RuntimeBinder.EnsureLockIsTaken();
     return(s_dictionary.TryGetValue(new Key(name, parent), out Symbol sym) ? FindCorrectKind(sym, kindmask) : null);
 }
Example #18
0
 public Symbol LookupAggMember(Name name, AggregateSymbol agg, symbmask_t mask)
 {
     return getBSymmgr().LookupAggMember(name, agg, mask);
 }
Example #19
0
 public Symbol LookupNextSym(Symbol sym, ParentSymbol parent, symbmask_t kindmask)
 {
     return BSYMMGR.LookupNextSym(sym, parent, kindmask);
 }
Example #20
0
 public Symbol LookupAggMember(Name name, AggregateSymbol agg, symbmask_t mask)
 {
     return(getBSymmgr().LookupAggMember(name, agg, mask));
 }
Example #21
0
 public Symbol LookupNextSym(Symbol sym, ParentSymbol parent, symbmask_t kindmask)
 {
     return(BSYMMGR.LookupNextSym(sym, parent, kindmask));
 }
Example #22
0
        public CMethodIterator GetMethodIterator(
            CSemanticChecker pChecker, SymbolLoader pSymLoader, CType pObject, CType pQualifyingType, Declaration pContext, bool allowBogusAndInaccessible, bool allowExtensionMethods, int arity, EXPRFLAG flags, symbmask_t mask)
        {
            Debug.Assert(pSymLoader != null);
            CMethodIterator iterator = new CMethodIterator(pChecker, pSymLoader, _pName, ContainingTypes, pObject, pQualifyingType, pContext, allowBogusAndInaccessible, allowExtensionMethods, arity, flags, mask);

            return(iterator);
        }
Example #23
0
 public CMethodIterator GetMethodIterator(
     CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments) =>
 new CMethodIterator(_pName, ContainingTypes, qualifyingType, context, arity, flags, mask, nonTrailingNamedArguments);
Example #24
0
        /////////////////////////////////////////////////////////////////////////////////

        internal bool AggregateContainsMethod(AggregateSymbol agg, string szName, symbmask_t mask)
        {
            return _semanticChecker.SymbolLoader.LookupAggMember(GetName(szName), agg, mask) != null;
        }
Example #25
0
 public static Symbol LookupSym(Name name, ParentSymbol parent, symbmask_t kindmask) =>
 s_dictionary.TryGetValue(new Key(name, parent), out Symbol sym) ? FindCorrectKind(sym, kindmask) : null;