public override void VisitArrayIndexerExpression(ArrayIndexerExpression node) { this.VisitArrayIndexerExpression(node); V_0 = 0; while (V_0 < node.get_Indices().get_Count()) { V_1 = node.get_Indices().get_Item(V_0); if (V_1.get_HasType() && this.ShouldAddCast(V_1.get_ExpressionType().Resolve(), this.typeSystem.get_Int32())) { node.get_Indices().set_Item(V_0, new ExplicitCastExpression(V_1, this.typeSystem.get_Int32(), null)); } V_0 = V_0 + 1; } return; }
private TypeReference GetUseInArrayIndexer(ArrayIndexerExpression arrayIndexerExpression, VariableReference variable) { V_0 = arrayIndexerExpression.get_Indices().GetEnumerator(); try { while (V_0.MoveNext()) { V_1 = V_0.get_Current(); if (V_1 as VariableReferenceExpression == null || (object)(V_1 as VariableReferenceExpression).get_Variable() != (object)variable) { continue; } V_2 = this.typeSystem.get_Int32(); goto Label1; } goto Label0; } finally { if (V_0 != null) { V_0.Dispose(); } } Label1: return(V_2); Label0: return(new TypeReference("System", "Array", this.typeSystem.get_Object().get_Module(), this.typeSystem.get_Object().get_Scope())); }
public override void VisitArrayIndexerExpression(ArrayIndexerExpression node) { this.Visit(node.get_Target()); this.expressions.Push(0); this.Visit(node.get_Indices()); dummyVar0 = this.expressions.Pop(); return; }
private bool CheckArrayIndexerExpression(ArrayIndexerExpression expression, VariableReference arrayVariable, int index) { if (expression.get_Target().get_CodeNodeType() != 26 || (object)(expression.get_Target() as VariableReferenceExpression).get_Variable() != (object)arrayVariable || expression.get_Indices().get_Count() != 1 || expression.get_Indices().get_Item(0).get_CodeNodeType() != 22) { return(false); } return(Convert.ToInt32((expression.get_Indices().get_Item(0) as LiteralExpression).get_Value()) == index); }
public override ICodeNode VisitArrayIndexerExpression(ArrayIndexerExpression node) { node.set_Target((Expression)this.VisitTargetExpression(node.get_Target())); node.set_Indices((ExpressionCollection)this.Visit(node.get_Indices())); return(node); }