Esempio n. 1
0
 internal ForwardAnalysisServices(WorkList workList, FunctionResolverBase functionResolver, ExpressionEvaluatorBase evaluator, EmptySetDelegate emptySet, FlowResolverBase flowResolver)
 {
     _workList        = workList;
     CreateEmptySet   = emptySet;
     FlowResolver     = flowResolver;
     FunctionResolver = functionResolver;
     Evaluator        = evaluator;
 }
Esempio n. 2
0
        /// <summary>
        /// Initialize all resolvers and services
        /// </summary>
        private void initialize()
        {
            _expressionEvaluator = createExpressionEvaluator();
            _flowResolver        = createFlowResolver();
            _functionResolver    = createFunctionResolver();

            _services = new ForwardAnalysisServices(
                _workList,
                _functionResolver, _expressionEvaluator, createEmptySet, _flowResolver

                );
        }
Esempio n. 3
0
        /// <summary>
        /// Returns biggest integer index in arrays represented by this entry.
        /// </summary>
        /// <returns>The biggest integer index.</returns>
        /// <param name="context">Context where the index is searched.</param>
        /// <param name="evaluator">Expression evaluator.</param>
        public int BiggestIntegerIndex(SnapshotBase context, ExpressionEvaluatorBase evaluator)
        {
            int biggestIndex = -1;

            foreach (var index in iterateIndexes(context))
            {
                int currentIndex;
                if (evaluator.TryIdentifyInteger(index.DirectName, out currentIndex))
                {
                    if (currentIndex > biggestIndex)
                    {
                        biggestIndex = currentIndex;
                    }
                }
            }
            return(biggestIndex);
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ObjectInitializer" /> class.
 /// </summary>
 /// <param name="resolver">Expression resolver used to evaluate initialization values</param>
 public ObjectInitializer(ExpressionEvaluatorBase resolver)
 {
     expressionResolver = resolver;
 }