SetIfacesAll() 공개 메소드

public SetIfacesAll ( TypeArray ifacesAll ) : void
ifacesAll TypeArray
리턴 void
예제 #1
0
        /////////////////////////////////////////////////////////////////////////////////
        public AggregateSymbol CreateAggregate(Name name, NamespaceOrAggregateSymbol parent, InputFile infile, TypeManager typeManager)
        {
            if (name == null || parent == null || infile == null || typeManager == null)
            {
                throw Error.InternalCompilerError();
            }

            AggregateSymbol sym = null;

            if (infile.GetAssemblyID() == KAID.kaidUnresolved)
            {
                // Unresolved aggs need extra storage.
                sym = CreateUnresolvedAggregate(name, parent, typeManager);
            }
            else
            {
                sym      = newBasicSym(SYMKIND.SK_AggregateSymbol, name, parent).AsAggregateSymbol();
                sym.name = name;
                sym.SetTypeManager(typeManager);
                sym.SetSealed(false);
                sym.SetAccess(ACCESS.ACC_UNKNOWN);
                sym.initBogus();
                sym.SetIfaces(null);
                sym.SetIfacesAll(null);
                sym.SetTypeVars(null);
            }

            sym.InitFromInfile(infile);
            return(sym);
        }
예제 #2
0
        /////////////////////////////////////////////////////////////////////////////////
        public static AggregateSymbol CreateAggregate(Name name, NamespaceOrAggregateSymbol parent)
        {
            Debug.Assert(name != null);
            Debug.Assert(parent != null);

            AggregateSymbol sym = (AggregateSymbol)NewBasicSymbol(SYMKIND.SK_AggregateSymbol, name, parent);

            sym.name = name;
            sym.SetSealed(false);
            sym.SetAccess(ACCESS.ACC_UNKNOWN);
            sym.SetIfaces(null);
            sym.SetIfacesAll(null);
            sym.SetTypeVars(null);

            return(sym);
        }
예제 #3
0
        /////////////////////////////////////////////////////////////////////////////////
        public AggregateSymbol CreateAggregate(Name name, NamespaceOrAggregateSymbol parent, TypeManager typeManager)
        {
            if (name == null || parent == null || typeManager == null)
            {
                throw Error.InternalCompilerError();
            }

            AggregateSymbol sym = (AggregateSymbol)newBasicSym(SYMKIND.SK_AggregateSymbol, name, parent);

            sym.name = name;
            sym.SetTypeManager(typeManager);
            sym.SetSealed(false);
            sym.SetAccess(ACCESS.ACC_UNKNOWN);
            sym.SetIfaces(null);
            sym.SetIfacesAll(null);
            sym.SetTypeVars(null);

            return(sym);
        }
예제 #4
0
        /////////////////////////////////////////////////////////////////////////////////

        private void SetInterfacesOnAggregate(AggregateSymbol aggregate, Type type)
        {
            Type[] interfaces;

            if (type.GetTypeInfo().IsGenericType)
            {
                type = type.GetTypeInfo().GetGenericTypeDefinition();
            }
            interfaces = type.GetTypeInfo().ImplementedInterfaces.ToArray();

            // We wont be able to find the difference between Ifaces and 
            // IfacesAll anymore - at runtime, the class implements all of its
            // Ifaces and IfacesAll, so theres no way to differentiate.
            //
            // This actually doesn't matter though - for conversions and methodcalls,
            // we don't really care where they've come from as long as we know the overall
            // set of IfacesAll.

            aggregate.SetIfaces(_bsymmgr.AllocParams(interfaces.Length, GetCTypeArrayFromTypes(interfaces)));
            aggregate.SetIfacesAll(aggregate.GetIfaces());
        }