Example #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;
 }
Example #2
0
 public virtual Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction.Expression = this.VisitExpression(switchInstruction.Expression);
     return switchInstruction;
 }
Example #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;
 }
Example #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;
 }
Example #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;
		}
Example #6
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction) {
   if (switchInstruction == null) return null;
   return ((SwitchInstruction)switchInstruction.Clone());
 }
Example #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;
 }
Example #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); }