private void TransferLabel(ExpressionStatement expressionStatement) { if (String.op_Equality(expressionStatement.get_Label(), String.Empty)) { return; } V_0 = expressionStatement.get_Label(); V_1 = expressionStatement; while (V_1.get_Parent() != null) { V_3 = V_1.get_Parent() as BlockStatement; V_4 = V_3.get_Statements().IndexOf(V_1); if (V_4 != V_3.get_Statements().get_Count() - 1) { V_5 = V_3.get_Statements().get_Item(V_4 + 1); this.MoveLabel(V_5, V_0); return; } if (this.IsLoopBody(V_3)) { this.MoveLabel(V_3.get_Statements().get_Item(0), V_0); return; } do { V_1 = V_1.get_Parent(); }while (V_1.get_Parent() != null && V_1.get_Parent().get_CodeNodeType() != CodeNodeType.BlockStatement); } V_2 = new EmptyStatement(); this.theBody.get_Statements().Add(V_2); this.MoveLabel(V_2, V_0); return; }
public override void VisitExpressionStatement(ExpressionStatement node) { V_0 = null; if (node.get_Expression().get_CodeNodeType() == 24 && (node.get_Expression() as BinaryExpression).get_IsAssignmentExpression()) { V_1 = (node.get_Expression() as BinaryExpression).get_Left(); if (V_1.get_CodeNodeType() != 26) { if (V_1.get_CodeNodeType() == 27) { V_0 = (V_1 as VariableDeclarationExpression).get_Variable(); } } else { V_0 = (V_1 as VariableReferenceExpression).get_Variable(); } } if (V_0 == null || node.get_Parent().get_CodeNodeType() != CodeNodeType.BlockStatement || this.bannedVariables.Contains(V_0)) { this.Visit(node.get_Expression()); return; } if (this.referenceToDeclarationStatementMap.Remove(V_0)) { dummyVar0 = this.bannedVariables.Add(V_0); } else { this.referenceToDeclarationStatementMap.set_Item(V_0, node); } this.Visit((node.get_Expression() as BinaryExpression).get_Right()); return; }
public override void VisitExpressionStatement(ExpressionStatement node) { if (node.IsAssignmentStatement() && node.get_Parent().get_CodeNodeType() == CodeNodeType.BlockStatement) { V_0 = node.get_Expression() as BinaryExpression; if (V_0.get_Left().get_CodeNodeType() == 26) { this.Visit(V_0.get_Right()); this.AddDefinition((V_0.get_Left() as VariableReferenceExpression).get_Variable().Resolve(), node); return; } } this.VisitExpressionStatement(node); return; }