예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        public GlobalSymbolContext(NameManager namemgr)
        {
            GlobalSymbols = new BSYMMGR(namemgr);
            _predefTypes  = new PredefinedTypes(GlobalSymbols);
            TypeManager   = new TypeManager(GlobalSymbols, _predefTypes);

            _nameManager = namemgr;
        }
예제 #4
0
        public TypeManager(BSYMMGR bsymmgr, PredefinedTypes predefTypes)
        {
            _typeTable = new TypeTable();

            _stvcMethod  = new StdTypeVarColl();
            _BSymmgr     = bsymmgr;
            _predefTypes = predefTypes;
        }
예제 #5
0
        public GlobalSymbolContext(NameManager namemgr)
        {
            TypeManager = new TypeManager();
            GlobalSymbols = new BSYMMGR(namemgr, TypeManager);
            _predefTypes = new PredefinedTypes(GlobalSymbols);
            TypeManager.Init(GlobalSymbols, _predefTypes);
            GlobalSymbols.Init();

            _nameManager = namemgr;
        }
예제 #6
0
        public GlobalSymbolContext(NameManager namemgr)
        {
            TypeManager   = new TypeManager();
            GlobalSymbols = new BSYMMGR(namemgr, TypeManager);
            m_predefTypes = new PredefinedTypes(GlobalSymbols);
            TypeManager.Init(GlobalSymbols, m_predefTypes);
            GlobalSymbols.Init();

            m_nameManager = namemgr;
        }
        // We want to delay load the predef syms as needed.
        private AggregateSymbol DelayLoadPredefSym(PredefinedType pt)
        {
            CType           type = runtimeBinderSymbolTable.GetCTypeFromType(PredefinedTypeFacts.GetAssociatedSystemType(pt));
            AggregateSymbol sym  = type.getAggregate();

            // If we failed to load this thing, we have problems.
            if (sym == null)
            {
                return(null);
            }
            return(PredefinedTypes.InitializePredefinedType(sym, pt));
        }
예제 #8
0
        public TypeManager(BSYMMGR bsymmgr, PredefinedTypes predefTypes)
        {
            _typeFactory = new TypeFactory();
            _typeTable   = new TypeTable();

            // special types with their own symbol kind.
            _voidType    = _typeFactory.CreateVoid();
            _nullType    = _typeFactory.CreateNull();
            _typeMethGrp = _typeFactory.CreateMethodGroup();
            _argListType = _typeFactory.CreateArgList();

            _stvcMethod  = new StdTypeVarColl();
            _stvcClass   = new StdTypeVarColl();
            _BSymmgr     = bsymmgr;
            _predefTypes = predefTypes;
        }
예제 #9
0
 internal void Init(BSYMMGR bsymmgr, PredefinedTypes predefTypes)
 {
     _BSymmgr = bsymmgr;
     _predefTypes = predefTypes;
 }
예제 #10
0
 internal void Init(BSYMMGR bsymmgr, PredefinedTypes predefTypes)
 {
     _BSymmgr     = bsymmgr;
     _predefTypes = predefTypes;
 }
예제 #11
0
 public GlobalSymbolContext()
 {
     GlobalSymbols = new BSYMMGR();
     _predefTypes  = new PredefinedTypes(GlobalSymbols);
     TypeManager   = new TypeManager(GlobalSymbols, _predefTypes);
 }