Example #1
0
        public override IEnumerable <DependencyListEntry> GetStaticDependencies(NodeFactory factory)
        {
            UtcNodeFactory hostedFactory = factory as UtcNodeFactory;

            Debug.Assert(hostedFactory != null);
            DependencyListEntry[] result = new DependencyListEntry[2];
            result[0] = new DependencyListEntry(hostedFactory.GCStaticDescRegion, "GCStaticDesc Region");
            result[1] = new DependencyListEntry(hostedFactory.TypeGCStaticsSymbol(_type), "GC Static Base Symbol");
            return(result);
        }
Example #2
0
        public override IEnumerable<DependencyListEntry> GetStaticDependencies(NodeFactory factory)
        {
            DependencyListEntry[] result;
            if (factory.TypeInitializationManager.HasEagerStaticConstructor(_type))
            {
                result = new DependencyListEntry[3];
                result[2] = new DependencyListEntry(factory.EagerCctorIndirection(_type.GetStaticConstructor()), "Eager .cctor");
            }
            else
                result = new DependencyListEntry[2];

            result[0] = new DependencyListEntry(factory.ThreadStaticsRegion, "ThreadStatics Region");
            result[1] = new DependencyListEntry(GetGCStaticEETypeNode(factory), "ThreadStatic EEType");
            return result;
        }
Example #3
0
        public override IEnumerable <DependencyListEntry> GetStaticDependencies(NodeFactory factory)
        {
            UtcNodeFactory hostedFactory = factory as UtcNodeFactory;

            Debug.Assert(hostedFactory != null);
            bool refersToGCStaticsSymbol = !_type.IsCanonicalSubtype(CanonicalFormKind.Any);

            DependencyListEntry[] result = new DependencyListEntry[refersToGCStaticsSymbol ? 2 : 1];
            result[0] = new DependencyListEntry(hostedFactory.GCStaticDescRegion, "GCStaticDesc Region");
            if (refersToGCStaticsSymbol)
            {
                result[1] = new DependencyListEntry(hostedFactory.TypeGCStaticsSymbol(_type), "GC Static Base Symbol");
            }
            return(result);
        }
        protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory)
        {
            PgoValueEmitter pgoEmitter = new PgoValueEmitter(_factory.CompilationModuleGroup, _symbolNodeFactory, false);

            foreach (MethodDesc method in _instrumentationDataMethods)
            {
                PgoProcessor.EncodePgoData(_profileDataManager[method].SchemaData, pgoEmitter, false);
            }
            DependencyListEntry[] symbols = new DependencyListEntry[pgoEmitter.ReferencedImports.Count];
            for (int i = 0; i < symbols.Length; i++)
            {
                symbols[i] = new DependencyListEntry(pgoEmitter.ReferencedImports[i], "Pgo Instrumentation Data");
            }

            return(new DependencyList(symbols));
        }
Example #5
0
        public override IEnumerable <DependencyListEntry> GetStaticDependencies(NodeFactory factory)
        {
            DependencyListEntry[] result;
            if (factory.TypeInitializationManager.HasEagerStaticConstructor(_type))
            {
                result    = new DependencyListEntry[3];
                result[2] = new DependencyListEntry(factory.EagerCctorIndirection(_type.GetStaticConstructor()), "Eager .cctor");
            }
            else
            {
                result = new DependencyListEntry[2];
            }

            result[0] = new DependencyListEntry(factory.ThreadStaticsRegion, "ThreadStatics Region");
            result[1] = new DependencyListEntry(GetGCStaticEETypeNode(factory), "ThreadStatic EEType");
            return(result);
        }
Example #6
0
        public override IEnumerable <DependencyListEntry> GetStaticDependencies(NodeFactory factory)
        {
            DependencyListEntry[] result;
            if (!_type.IsCanonicalSubtype(CanonicalFormKind.Any))
            {
                result    = new DependencyListEntry[2];
                result[0] = new DependencyListEntry(Region(factory), "GCStaticDesc Region");
                result[1] = new DependencyListEntry(GCStaticsSymbol(factory), "GC Static Base Symbol");
            }
            else
            {
                Debug.Assert(Region(factory) == null);
                result    = new DependencyListEntry[1];
                result[0] = new DependencyListEntry(((UtcNodeFactory)factory).StandaloneGCStaticDescRegion(this), "Standalone GCStaticDesc holder");
            }

            return(result);
        }