Ejemplo n.º 1
0
        protected AbstractDataFlowAnalysisContext(
            AbstractValueDomain <TAbstractAnalysisValue> valueDomain,
            WellKnownTypeProvider wellKnownTypeProvider,
            ControlFlowGraph controlFlowGraph,
            ISymbol owningSymbol,
            AnalyzerOptions analyzerOptions,
            InterproceduralAnalysisConfiguration interproceduralAnalysisConfig,
            bool pessimisticAnalysis,
            bool predicateAnalysis,
            bool exceptionPathsAnalysis,
            CopyAnalysisResult copyAnalysisResultOpt,
            PointsToAnalysisResult pointsToAnalysisResultOpt,
            ValueContentAnalysisResult valueContentAnalysisResultOpt,
            Func <TAnalysisContext, TAnalysisResult> tryGetOrComputeAnalysisResult,
            ControlFlowGraph parentControlFlowGraphOpt,
            InterproceduralAnalysisData <TAnalysisData, TAnalysisContext, TAbstractAnalysisValue> interproceduralAnalysisDataOpt,
            InterproceduralAnalysisPredicate interproceduralAnalysisPredicateOpt)
        {
            Debug.Assert(valueDomain != null, "valueDomain must not be null for use in ComputeHashCodeParts");
            Debug.Assert(controlFlowGraph != null);
            Debug.Assert(owningSymbol != null);
            Debug.Assert(owningSymbol.Kind == SymbolKind.Method ||
                         owningSymbol.Kind == SymbolKind.Field ||
                         owningSymbol.Kind == SymbolKind.Property ||
                         owningSymbol.Kind == SymbolKind.Event);
            Debug.Assert(Equals(owningSymbol.OriginalDefinition, owningSymbol));
            Debug.Assert(wellKnownTypeProvider != null);
            Debug.Assert(tryGetOrComputeAnalysisResult != null);
            Debug.Assert(pointsToAnalysisResultOpt == null ||
                         pointsToAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(copyAnalysisResultOpt == null ||
                         copyAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(valueContentAnalysisResultOpt == null ||
                         valueContentAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);

            ValueDomain                          = valueDomain;
            WellKnownTypeProvider                = wellKnownTypeProvider;
            ControlFlowGraph                     = controlFlowGraph;
            ParentControlFlowGraphOpt            = parentControlFlowGraphOpt;
            OwningSymbol                         = owningSymbol;
            AnalyzerOptions                      = analyzerOptions;
            InterproceduralAnalysisConfiguration = interproceduralAnalysisConfig;
            PessimisticAnalysis                  = pessimisticAnalysis;
            PredicateAnalysis                    = predicateAnalysis;
            ExceptionPathsAnalysis               = exceptionPathsAnalysis;
            CopyAnalysisResultOpt                = copyAnalysisResultOpt;
            PointsToAnalysisResultOpt            = pointsToAnalysisResultOpt;
            ValueContentAnalysisResultOpt        = valueContentAnalysisResultOpt;
            TryGetOrComputeAnalysisResult        = tryGetOrComputeAnalysisResult;
            InterproceduralAnalysisDataOpt       = interproceduralAnalysisDataOpt;
            InterproceduralAnalysisPredicateOpt  = interproceduralAnalysisPredicateOpt;
        }
Ejemplo n.º 2
0
        protected AbstractDataFlowAnalysisContext(
            AbstractValueDomain <TAbstractAnalysisValue> valueDomain,
            WellKnownTypeProvider wellKnownTypeProvider,
            ControlFlowGraph controlFlowGraph,
            ISymbol owningSymbol,
            InterproceduralAnalysisConfiguration interproceduralAnalysisConfig,
            bool pessimisticAnalysis,
            bool predicateAnalysis,
            bool exceptionPathsAnalysis,
            CopyAnalysisResult copyAnalysisResultOpt,
            PointsToAnalysisResult pointsToAnalysisResultOpt,
            Func <TAnalysisContext, TAnalysisResult> getOrComputeAnalysisResult,
            ControlFlowGraph parentControlFlowGraphOpt,
            InterproceduralAnalysisData <TAnalysisData, TAnalysisContext, TAbstractAnalysisValue> interproceduralAnalysisDataOpt,
            InterproceduralAnalysisPredicate interproceduralAnalysisPredicateOpt)
        {
            Debug.Assert(controlFlowGraph != null);
            Debug.Assert(owningSymbol != null);
            Debug.Assert(owningSymbol.Kind == SymbolKind.Method ||
                         owningSymbol.Kind == SymbolKind.Field ||
                         owningSymbol.Kind == SymbolKind.Property ||
                         owningSymbol.Kind == SymbolKind.Event);
            Debug.Assert(Equals(owningSymbol.OriginalDefinition, owningSymbol));
            Debug.Assert(wellKnownTypeProvider != null);
            Debug.Assert(getOrComputeAnalysisResult != null);

            ValueDomain                          = valueDomain;
            WellKnownTypeProvider                = wellKnownTypeProvider;
            ControlFlowGraph                     = controlFlowGraph;
            ParentControlFlowGraphOpt            = parentControlFlowGraphOpt;
            OwningSymbol                         = owningSymbol;
            InterproceduralAnalysisConfiguration = interproceduralAnalysisConfig;
            PessimisticAnalysis                  = pessimisticAnalysis;
            PredicateAnalysis                    = predicateAnalysis;
            ExceptionPathsAnalysis               = exceptionPathsAnalysis;
            CopyAnalysisResultOpt                = copyAnalysisResultOpt;
            PointsToAnalysisResultOpt            = pointsToAnalysisResultOpt;
            GetOrComputeAnalysisResult           = getOrComputeAnalysisResult;
            InterproceduralAnalysisDataOpt       = interproceduralAnalysisDataOpt;
            InterproceduralAnalysisPredicateOpt  = interproceduralAnalysisPredicateOpt;
        }