//////////////////////////////////////////////////////////////////////////////// // 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). private void InitPreLoad() { 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 = this.GetNameManager().Add(sub); NamespaceSymbol sym = this.LookupGlobalSymCore(nm, ns, symbmask_t.MASK_NamespaceSymbol).AsNamespaceSymbol(); if (sym == null) { ns = _symFactory.CreateNamespace(nm, ns); } else { ns = sym; } start += sub.Length + 1; } } }
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; } } }
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); }
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); }