public TypeManager() { _predefTypes = null; // Initialized via the Init call. _BSymmgr = null; // Initialized via the Init call. _typeFactory = new TypeFactory(); _typeTable = new TypeTable(); // special types with their own symbol kind. _errorType = _typeFactory.CreateError(null, null, null, null, null); _voidType = _typeFactory.CreateVoid(); _nullType = _typeFactory.CreateNull(); _typeUnit = _typeFactory.CreateUnit(); _typeAnonMeth = _typeFactory.CreateAnonMethod(); _typeMethGrp = _typeFactory.CreateMethodGroup(); _argListType = _typeFactory.CreateArgList(); InitType(_errorType); _errorType.SetErrors(true); InitType(_voidType); InitType(_nullType); InitType(_typeUnit); InitType(_typeAnonMeth); InitType(_typeMethGrp); _stvcMethod = new StdTypeVarColl(); _stvcClass = new StdTypeVarColl(); }
//------------------------------------------------------------ // ERRLOC Constructor (3) // /// <para>Constructor.</para> /// <para>Get the current position from the BASENODE argument and /// mapping information from INFILESYM.SourceData of BSYMMGR.</para> /// <param name="symmgr"></param> /// <param name="node"></param> //------------------------------------------------------------ internal ERRLOC(BSYMMGR symmgr, BASENODE node, bool fullPath) { if (node != null) { DebugUtil.Assert(symmgr != null); string inputFileName = node.GetContainingFileName(fullPath); INFILESYM inputFile = symmgr.FindInfileSym(inputFileName); sourceFileName = inputFileName; sourceMapFileName = inputFileName; if (inputFile != null) { sourceData = inputFile.SourceData; SetLine(node); SetStart(node); SetEnd(node); mapStartPos = (startPos != null ? startPos.Clone() : null); mapEndPos = (endPos != null ? endPos.Clone() : null); string sd; bool bd1, bd2; sourceData.Module.MapLocation(mapStartPos, out sourceMapFileName, out bd1, out bd2); sourceData.Module.MapLocation(mapEndPos, out sd, out bd1, out bd2); return; } } }
public GlobalSymbolContext(NameManager namemgr) { TypeManager = new TypeManager(); GlobalSymbols = new BSYMMGR(namemgr, TypeManager); _predefTypes = new PredefinedTypes(GlobalSymbols); TypeManager.Init(GlobalSymbols, _predefTypes); GlobalSymbols.Init(); _nameManager = namemgr; }
///////////////////////////////////////////////////////////////////////////////// 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(); }
private KAID _aidMsCorLib; // The assembly ID for all predefined types. public PredefinedTypes(BSYMMGR pBSymmgr) { _pBSymmgr = pBSymmgr; _aidMsCorLib = KAID.kaidNil; _runtimeBinderSymbolTable = null; }
public NullableType CreateNullable(Name name, CType pUnderlyingType, BSYMMGR symmgr, TypeManager typeManager) { NullableType type = new NullableType(); type.SetName(name); type.SetUnderlyingType(pUnderlyingType); type.symmgr = symmgr; type.typeManager = typeManager; type.SetTypeKind(TypeKind.TK_NullableType); return type; }
internal void Init(BSYMMGR bsymmgr, PredefinedTypes predefTypes) { _BSymmgr = bsymmgr; _predefTypes = predefTypes; }