Beispiel #1
0
        /// <summary>
        /// Initializes the summary.
        /// </summary>
        private void Initialize()
        {
            this.Node           = new ControlFlowGraphNode(this.AnalysisContext, this);
            this.GivesUpNodes   = new HashSet <ControlFlowGraphNode>();
            this.ExitNodes      = new HashSet <ControlFlowGraphNode>();
            this.GivesUpSet     = new HashSet <int>();
            this.AccessSet      = new Dictionary <int, HashSet <SyntaxNode> >();
            this.FieldAccessSet = new Dictionary <IFieldSymbol, HashSet <SyntaxNode> >();
            this.SideEffects    = new Dictionary <IFieldSymbol, HashSet <int> >();
            this.ReturnSet      = new Tuple <HashSet <int>, HashSet <IFieldSymbol> >(
                new HashSet <int>(), new HashSet <IFieldSymbol>());
            this.ReturnTypeSet = new HashSet <ITypeSymbol>();

            if (!this.TryConstruct())
            {
                return;
            }

            this.DataFlowMap = DataFlowAnalysis.AnalyseControlFlowGraph(this, this.AnalysisContext);
            this.ComputeAnySideEffects();
            AnalysisContext.Summaries.Add(this.Method, this);

            //this.DataFlowMap.Print();
            //this.DataFlowMap.PrintReachabilityMap();
            //this.DataFlowMap.PrintObjectTypeMap();
            //this.PrintAccesses();
            //this.PrintFieldAccesses();
            //this.PrintSideEffects();
            //this.PrintReturnSet();
            //this.PrintReturnTypeSet();
            //this.DataFlowMap.PrintResets();
        }