示例#1
0
        public BSYMMGR()
        {
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal);

            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(NameManager.Lookup(""), null);

            ////////////////////////////////////////////////////////////////////////////////
            // Build the data structures needed to make FPreLoad fast. Make sure the
            // namespaces are created. Compute and sort hashes of the NamespaceSymbol * value and type
            // name (sans arity indicator).

            for (int i = 0; i < (int)PredefinedType.PT_COUNT; ++i)
            {
                NamespaceSymbol ns    = GetRootNS();
                string          name  = PredefinedTypeFacts.GetName((PredefinedType)i);
                int             start = 0;
                while (start < name.Length)
                {
                    int iDot = name.IndexOf('.', start);
                    if (iDot == -1)
                    {
                        break;
                    }
                    string sub = (iDot > start) ? name.Substring(start, iDot - start) : name.Substring(start);
                    Name   nm  = NameManager.Add(sub);
                    ns     = LookupGlobalSymCore(nm, ns, symbmask_t.MASK_NamespaceSymbol) as NamespaceSymbol ?? _symFactory.CreateNamespace(nm, ns);
                    start += sub.Length + 1;
                }
            }
        }
示例#2
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, bool loadNames)
        {
            m_pSymTable = symtable;

            if (loadNames)
            {
                m_pMissingNameNode = NameManager.GetPredefinedName(PredefinedName.PN_MISSING);
                m_pMissingNameSym  = NameManager.GetPredefinedName(PredefinedName.PN_MISSINGSYM);
            }
        }
示例#3
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, NameManager namemgr)
        {
            m_pSymTable = symtable;

            if (namemgr != null)
            {
                m_pMissingNameNode = namemgr.GetPredefName(PredefinedName.PN_MISSING);
                m_pMissingNameSym  = namemgr.GetPredefName(PredefinedName.PN_MISSINGSYM);
            }
        }
示例#4
0
        public BSYMMGR(NameManager nameMgr)
        {
            this.m_nameTable = nameMgr;
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal);
            _miscSymFactory  = new MiscSymFactory(this.tableGlobal);

            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(m_nameTable.Lookup(""), null);
            GetNsAid(_rootNS);
        }
示例#5
0
        public BSYMMGR(NameManager nameMgr, TypeManager typeManager)
        {
            this.m_nameTable = nameMgr;
            this.tableGlobal = new SYMTBL();
            _symFactory      = new SymFactory(this.tableGlobal, this.m_nameTable);
            _miscSymFactory  = new MiscSymFactory(this.tableGlobal);

            this.ssetAssembly = new List <AidContainer>();

            _infileUnres          = new InputFile();
            _infileUnres.isSource = false;
            _infileUnres.SetAssemblyID(KAID.kaidUnresolved);

            this.ssetAssembly.Add(new AidContainer(_infileUnres));
            this.bsetGlobalAssemblies = new HashSet <KAID>();
            this.bsetGlobalAssemblies.Add(KAID.kaidThisAssembly);
            this.tableTypeArrays = new Dictionary <TypeArrayKey, TypeArray>();
            _rootNS = _symFactory.CreateNamespace(m_nameTable.Add(""), null);
            GetNsAid(_rootNS, KAID.kaidGlobal);
        }
示例#6
0
        /////////////////////////////////////////////////////////////////////////////////

        internal SymbolTable(
            SYMTBL symTable,
            SymFactory symFactory,
            NameManager nameManager,
            TypeManager typeManager,
            BSYMMGR bsymmgr,
            CSemanticChecker semanticChecker,

            InputFile infile)
        {
            _symbolTable = symTable;
            _symFactory = symFactory;
            _nameManager = nameManager;
            _typeManager = typeManager;
            _bsymmgr = bsymmgr;
            _semanticChecker = semanticChecker;

            _infile = infile;

            ClearCache();
        }
示例#7
0
 public SymFactory(
     SYMTBL symtable,
     NameManager namemgr) :
     base(symtable, namemgr)
 {
 }
示例#8
0
        // Constructor.

        public MiscSymFactory(SYMTBL symtable)
            : base(symtable)
        {
        }
示例#9
0
 public SymFactory(
     SYMTBL symtable,
     NameManager namemgr) :
     base(symtable, namemgr)
 {
 }
示例#10
0
 public SymFactory(SYMTBL symtable)
 {
     _symbolTable = symtable;
 }
示例#11
0
 public SymFactory(SYMTBL symtable) :
     base(symtable, true)
 {
 }
示例#12
0
        // This class should never be created on its own.
        protected SymFactoryBase(SYMTBL symtable, NameManager namemgr)
        {
            m_pSymTable = symtable;

            if (namemgr != null)
            {
                m_pMissingNameNode = namemgr.GetPredefName(PredefinedName.PN_MISSING);
                m_pMissingNameSym = namemgr.GetPredefName(PredefinedName.PN_MISSINGSYM);
            }
        }
示例#13
0
 // This class should never be created on its own.
 protected SymFactoryBase(SYMTBL symtable)
 {
     m_pSymTable = symtable;
 }
示例#14
0
        // Constructor.

        public MiscSymFactory(SYMTBL symtable)
            : base(symtable, null)
        {
        }