Esempio n. 1
0
        protected AnalysisEntityBasedPredicateAnalysisData(
            AnalysisEntityBasedPredicateAnalysisData <TValue> data1,
            AnalysisEntityBasedPredicateAnalysisData <TValue> data2,
            MapAbstractDomain <AnalysisEntity, TValue> coreDataAnalysisDomain)
            : base(data1, data2, data1.CoreAnalysisData,
                   data2.CoreAnalysisData, data1.IsReachableBlockData, coreDataAnalysisDomain)
        {
            Debug.Assert(data1.IsReachableBlockData == data1.IsReachableBlockData);

            CoreAnalysisData = coreDataAnalysisDomain.Merge(data1.CoreAnalysisData, data2.CoreAnalysisData);
        }
Esempio n. 2
0
        private static DictionaryAnalysisData <TKey, TValue> MergeForPredicatedDataInOneBranch(
            DictionaryAnalysisData <TKey, TValue> predicatedData,
            DictionaryAnalysisData <TKey, TValue> coreAnalysisDataForOtherBranch,
            MapAbstractDomain <TKey, TValue> coreDataAnalysisDomain)
        {
            if (predicatedData == null)
            {
                return(null);
            }

            return(coreDataAnalysisDomain.Merge(predicatedData, coreAnalysisDataForOtherBranch));
        }
Esempio n. 3
0
        private static DictionaryAnalysisData <TKey, TValue> Merge(
            DictionaryAnalysisData <TKey, TValue> predicateTrueOrFalseData1,
            DictionaryAnalysisData <TKey, TValue> predicateTrueOrFalseData2,
            DictionaryAnalysisData <TKey, TValue> coreAnalysisData1,
            DictionaryAnalysisData <TKey, TValue> coreAnalysisData2,
            MapAbstractDomain <TKey, TValue> coreDataAnalysisDomain,
            Action <DictionaryAnalysisData <TKey, TValue>, DictionaryAnalysisData <TKey, TValue> > applyPredicatedData)
        {
            if (predicateTrueOrFalseData1 == null)
            {
                return(predicateTrueOrFalseData2 != null?
                       CloneAndApplyPredicatedData(coreAnalysisData2, predicateTrueOrFalseData2, applyPredicatedData) :
                           null);
            }
            else if (predicateTrueOrFalseData2 == null)
            {
                return(CloneAndApplyPredicatedData(coreAnalysisData1, predicateTrueOrFalseData1, applyPredicatedData));
            }

            var appliedPredicatedData1 = CloneAndApplyPredicatedData(coreAnalysisData1, predicateTrueOrFalseData1, applyPredicatedData);
            var appliedPredicatedData2 = CloneAndApplyPredicatedData(coreAnalysisData2, predicateTrueOrFalseData2, applyPredicatedData);

            return(coreDataAnalysisDomain.Merge(appliedPredicatedData1, appliedPredicatedData2));
        }