SetIsNumberVar() приватный Метод

private SetIsNumberVar ( int varIndex ) : void
varIndex int
Результат void
Пример #1
0
		internal static void RunFlowAnalyzes(OptFunctionNode fn, Node[] statementNodes)
		{
			int paramCount = fn.fnode.GetParamCount();
			int varCount = fn.fnode.GetParamAndVarCount();
			int[] varTypes = new int[varCount];
			// If the variable is a parameter, it could have any type.
			for (int i = 0; i != paramCount; ++i)
			{
				varTypes[i] = Rhino.Optimizer.Optimizer.AnyType;
			}
			// If the variable is from a "var" statement, its typeEvent will be set
			// when we see the setVar node.
			for (int i_1 = paramCount; i_1 != varCount; ++i_1)
			{
				varTypes[i_1] = Rhino.Optimizer.Optimizer.NoType;
			}
			Block[] theBlocks = BuildBlocks(statementNodes);
			ReachingDefDataFlow(fn, statementNodes, theBlocks, varTypes);
			TypeFlow(fn, statementNodes, theBlocks, varTypes);
			for (int i_2 = paramCount; i_2 != varCount; i_2++)
			{
				if (varTypes[i_2] == Rhino.Optimizer.Optimizer.NumberType)
				{
					fn.SetIsNumberVar(i_2);
				}
			}
		}