Esempio n. 1
0
 private void UpdateContext(GotoStatement oldGoto, GotoStatement newGoto)
 {
     this.RemoveLabelFromCacheIfNotTargetedAnymore(oldGoto.get_TargetLabel(), oldGoto);
     V_1 = this.context.get_MethodContext().get_GotoStatements().IndexOf(oldGoto);
     this.context.get_MethodContext().get_GotoStatements().set_Item(V_1, newGoto);
     if (this.context.get_MethodContext().get_StatementToLogicalConstruct().ContainsKey(oldGoto))
     {
         V_2       = this.context.get_MethodContext().get_StatementToLogicalConstruct().get_Item(oldGoto);
         dummyVar0 = this.context.get_MethodContext().get_StatementToLogicalConstruct().Remove(oldGoto);
         this.context.get_MethodContext().get_StatementToLogicalConstruct().Add(newGoto, V_2);
     }
     return;
 }
Esempio n. 2
0
 public override ICodeNode VisitGotoStatement(GotoStatement node)
 {
     node = (GotoStatement)this.VisitGotoStatement(node);
     V_0  = node.get_TargetLabel();
     V_1  = this.context.get_MethodContext().get_GotoLabels().get_Item(V_0);
     if (this.TargetIsSwitchCaseEntryStatement(V_1))
     {
         V_2 = this.GetInnerMostParentOfType <SwitchCase>(V_1);
         V_3 = this.GetInnerMostParentOfType <SwitchStatement>(V_2);
         V_4 = this.GetInnerMostParentOfType <SwitchStatement>(node);
         if (V_4 != null && V_4 == V_3)
         {
             V_5 = this.CreateCaseGoto(node, V_2);
             this.UpdateContext(node, V_5);
             return(V_5);
         }
     }
     return(node);
 }