Ejemplo n.º 1
0
        /// <summary>
        /// Gets type mask at target ctype context representing given type names from given routine.
        /// </summary>
        public static TypeRefMask GetTypeMask(TypeRefContext /*!*/ targetCtx, Symbols.SourceRoutineSymbol /*!*/ routine, string[] tnames, bool fullyQualified = false)
        {
            Contract.ThrowIfNull(targetCtx);
            Contract.ThrowIfNull(routine);

            return(GetTypeMask(targetCtx, routine.TypeRefContext, tnames, fullyQualified));
        }
Ejemplo n.º 2
0
            public CommonState(FlowContext /*!*/ flowcontext, Symbols.SourceRoutineSymbol /*!*/ routine)
            {
                Debug.Assert(flowcontext != null);
                Debug.Assert(routine != null);

                _flowcontext = flowcontext;
                _routine     = routine;

                var locals = flowcontext.Locals;
                var dict   = new Dictionary <string, int>(locals.Length, StringComparer.OrdinalIgnoreCase);

                for (int i = 0; i < locals.Length; i++)
                {
                    dict[locals[i].Name] = i;
                }

                _varsIndex = dict;
            }
Ejemplo n.º 3
0
 public SemanticsBinder(Symbols.SourceRoutineSymbol routine, FlowAnalysis.FlowContext flowCtx = null /*PhpCompilation compilation, AST.GlobalCode ast, bool ignoreAccessibility*/)
 {
     _routine = routine;
     _flowCtx = flowCtx;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initial locals state for the Start block.
 /// </summary>
 public FlowState(FlowContext /*!*/ context, Symbols.SourceRoutineSymbol /*!*/ routine)
     : this(context, new CommonState(context, routine))
 {
 }