Exemple #1
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction = (SwitchInstruction)base.VisitSwitchInstruction((SwitchInstruction)switchInstruction.Clone());
     if (switchInstruction == null) return null;
     switchInstruction.Targets = this.VisitBlockList(switchInstruction.Targets);
     return switchInstruction;
 }
 public virtual Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction.Expression = this.VisitExpression(switchInstruction.Expression);
     return switchInstruction;
 }
Exemple #3
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction.Expression = this.VisitExpression(switchInstruction.Expression);
     for (int i = 0, n = switchInstruction.Targets == null ? 0 : switchInstruction.Targets.Count; i < n; i++)
     {
         Block target = switchInstruction.Targets[i];
         if (target == null) continue;
         this.StackLocalsAtEntry[target.UniqueKey] = this.localsStack.Clone();
     }
     return switchInstruction;
 }
Exemple #4
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction.Expression = this.VisitExpression(switchInstruction.Expression);
     for (int i = 0, n = switchInstruction.Targets == null ? 0 : switchInstruction.Targets.Count; i < n; i++)
     {
         Block target = switchInstruction.Targets[i];
         if (target == null) continue;
         this.VisitBlock(target);
     }
     return switchInstruction;
 }
Exemple #5
0
    /// <summary>
    /// 
    /// </summary>
    /// <param name="switchInstruction">Cloned</param>
    /// <returns></returns>
		public override Statement  VisitSwitchInstruction(SwitchInstruction switchInstruction)
		{
      switchInstruction = (SwitchInstruction)switchInstruction.Clone();
			switchInstruction.Expression = simplify(switchInstruction.Expression);
			this.switchInstructions.Add(switchInstruction);
			return switchInstruction;
		}
Exemple #6
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction) {
   if (switchInstruction == null) return null;
   return ((SwitchInstruction)switchInstruction.Clone());
 }
Exemple #7
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction) {
   BlockList targets = switchInstruction.Targets;
   // update the switch targets
   for(int i = 0; i < targets.Count; i++)
     targets[i] = get_new_target(targets[i]);
   return switchInstruction;
 }
Exemple #8
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     throw new NotImplementedException("Node type not yet supported");
 }
 public EventingVisitor(Action<SwitchInstruction> visitSwitchInstruction) { VisitedSwitchInstruction += visitSwitchInstruction; } public event Action<SwitchInstruction> VisitedSwitchInstruction; public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction) { if (VisitedSwitchInstruction != null) VisitedSwitchInstruction(switchInstruction); return base.VisitSwitchInstruction(switchInstruction); }