Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public virtual Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     if (switchInstruction == null) return null;
     switchInstruction.Expression = this.VisitExpression(switchInstruction.Expression);
     return switchInstruction;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
		}
Exemplo n.º 6
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction) {
   if (switchInstruction == null) return null;
   return ((SwitchInstruction)switchInstruction.Clone());
 }
Exemplo n.º 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;
 }
Exemplo n.º 8
0
 public override Statement VisitSwitchInstruction(SwitchInstruction switchInstruction)
 {
     throw new NotImplementedException("Node type not yet supported");
 }
Exemplo n.º 9
0
 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); }