Ejemplo n.º 1
0
 public override void Visit(ILeftShift leftShift)
 {
     if (Process(leftShift))
     {
         visitor.Visit(leftShift);
     }
     base.Visit(leftShift);
 }
Ejemplo n.º 2
0
 public void Visit(ILeftShift leftShift)
 {
     Contract.Requires(leftShift != null);
       throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public void Visit(ILeftShift leftShift)
 {
     this.traverser.Traverse(leftShift);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Traverses the left shift expression.
 /// </summary>
 public void Traverse(ILeftShift leftShift)
 {
     Contract.Requires(leftShift != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(leftShift);
       if (this.StopTraversal) return;
       this.TraverseChildren(leftShift);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(leftShift);
 }
Ejemplo n.º 5
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual void Visit(ILeftShift leftShift)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(leftShift);
       this.Visit(leftShift.LeftOperand);
       this.Visit(leftShift.RightOperand);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count.
       this.path.Pop();
 }
Ejemplo n.º 6
0
 public virtual void onASTElement(ILeftShift leftShift)
 {
 }
Ejemplo n.º 7
0
 public void Visit(ILeftShift leftShift)
 {
     this.result = this.copier.Copy(leftShift);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Visits the specified left shift.
 /// </summary>
 /// <param name="leftShift">The left shift.</param>
 public override void Visit(ILeftShift leftShift)
 {
     LeftShift mutableLeftShift = leftShift as LeftShift;
     if (alwaysMakeACopy || mutableLeftShift == null) mutableLeftShift = new LeftShift(leftShift);
     this.resultExpression = this.myCodeMutator.Visit(mutableLeftShift);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Generates IL for the specified left shift.
 /// </summary>
 /// <param name="leftShift">The left shift.</param>
 public override void TraverseChildren(ILeftShift leftShift)
 {
     this.Traverse(leftShift.LeftOperand);
       this.Traverse(leftShift.RightOperand);
       this.generator.Emit(OperationCode.Shl);
       this.StackSize--;
 }
Ejemplo n.º 10
0
 public override IExpression Rewrite(ILeftShift operation)
 {
     return(ReplaceOperation(operation));
 }
Ejemplo n.º 11
0
 public override void Visit(ILeftShift operation)
 {
     ProcessOperation(operation);
 }
 public override void Visit(ILeftShift leftShift)
 {
     if(Process(leftShift)){visitor.Visit(leftShift);}
     base.Visit(leftShift);
 }
Ejemplo n.º 13
0
 public void Visit(ILeftShift leftShift)
 {
     this.result = this.rewriter.Rewrite(leftShift);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Rewrites the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual IExpression Rewrite(ILeftShift leftShift)
 {
     var mutableLeftShift = leftShift as LeftShift;
       if (mutableLeftShift == null) return leftShift;
       this.RewriteChildren(mutableLeftShift);
       return mutableLeftShift;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="leftShift"></param>
 public LeftShift(ILeftShift leftShift)
     : base(leftShift)
 {
 }
Ejemplo n.º 16
0
 public virtual void onASTElement(ILeftShift leftShift) { }
Ejemplo n.º 17
0
 public override void TraverseChildren(ILeftShift leftShift)
 {
     base.TraverseChildren(leftShift);
     ((LeftShift)leftShift).Type = leftShift.LeftOperand.Type;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Returns a shallow copy of the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public LeftShift Copy(ILeftShift leftShift)
 {
     return new LeftShift(leftShift);
 }
Ejemplo n.º 19
0
 public override void Visit(ILeftShift leftShift)
 {
     allElements.Add(new InvokInfo(Traverser, "ILeftShift", leftShift));
 }
 public override void TraverseChildren(ILeftShift leftShift) {
   var targetExpression = leftShift.LeftOperand as ITargetExpression;
   if (targetExpression != null) { // x <<= e
     bool statement = this.currentExpressionIsOpAssignStatement;
     this.currentExpressionIsOpAssignStatement = false;
     this.VisitAssignment(targetExpression, leftShift, (IExpression e) => this.TraverseLeftShiftRightOperandAndDoOperation(e),
       treatAsStatement: statement, pushTargetRValue: true, resultIsInitialTargetRValue: leftShift.ResultIsUnmodifiedLeftOperand);
   } else { // x << e
     this.Traverse(leftShift.LeftOperand);
     this.TraverseLeftShiftRightOperandAndDoOperation(leftShift);
   }
 }
 /// <summary>
 /// Rewrites the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual IExpression Rewrite(ILeftShift leftShift)
 {
     return leftShift;
 }
Ejemplo n.º 22
0
        public override void TraverseChildren(ILeftShift leftShift)
{ MethodEnter(leftShift);
            base.TraverseChildren(leftShift);
     MethodExit();   }
Ejemplo n.º 23
0
 public override void TraverseChildren(ILeftShift leftShift) {
   base.TraverseChildren(leftShift);
   ((LeftShift)leftShift).Type = leftShift.LeftOperand.Type;
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Performs some computation with the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual void Visit(ILeftShift leftShift)
 {
 }
Ejemplo n.º 25
0
    /// <summary>
    /// Returns a deep copy of the given left shift expression.
    /// </summary>
    /// <param name="leftShift"></param>
    public LeftShift Copy(ILeftShift leftShift) {
      Contract.Requires(leftShift != null);
      Contract.Ensures(Contract.Result<LeftShift>() != null);

      var mutableCopy = this.shallowCopier.Copy(leftShift);
      this.CopyChildren((BinaryOperation)mutableCopy);
      return mutableCopy;
    }
Ejemplo n.º 26
0
 /// <summary>
 /// Traverses the children of the left shift expression.
 /// </summary>
 public virtual void TraverseChildren(ILeftShift leftShift)
 {
     Contract.Requires(leftShift != null);
       this.TraverseChildren((IBinaryOperation)leftShift);
 }
Ejemplo n.º 27
0
    /// <summary>
    /// Returns a shallow copy of the given left shift expression.
    /// </summary>
    /// <param name="leftShift"></param>
    public LeftShift Copy(ILeftShift leftShift) {
      Contract.Requires(leftShift != null);
      Contract.Ensures(Contract.Result<LeftShift>() != null);

      return new LeftShift(leftShift);
    }
Ejemplo n.º 28
0
 /// <summary>
 /// Performs some computation with the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual void Visit(ILeftShift leftShift)
 {
     this.Visit((IBinaryOperation)leftShift);
 }
 /// <summary>
 /// Performs some computation with the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual void Visit(ILeftShift leftShift)
 {
 }
Ejemplo n.º 30
0
 public void Visit(ILeftShift leftShift)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Visits the specified left shift.
 /// </summary>
 /// <param name="leftShift">The left shift.</param>
 public override void Visit(ILeftShift leftShift)
 {
     LeftShift mutableLeftShift = new LeftShift(leftShift);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableLeftShift);
 }
    public override void TraverseChildren(ILeftShift leftShift) {

      var needsParen = LowerPrecedenceThanParentExpression(leftShift);
      var savedCurrentPrecedence = this.currentPrecedence;
      this.currentPrecedence = this.Precedence(leftShift);

      if (needsParen) this.sourceEmitterOutput.Write("(");
      this.Traverse(leftShift.LeftOperand);
      if (leftShift.LeftOperand is ITargetExpression)
        this.sourceEmitterOutput.Write(" <<= ");
      else
        this.sourceEmitterOutput.Write(" << ");
      this.Traverse(leftShift.RightOperand);
      if (needsParen) this.sourceEmitterOutput.Write(")");

      this.currentPrecedence = savedCurrentPrecedence;
    }
Ejemplo n.º 33
0
 /// <summary>
 /// Returns a deep copy of the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public LeftShift Copy(ILeftShift leftShift)
 {
     var mutableCopy = this.shallowCopier.Copy(leftShift);
       this.CopyChildren((BinaryOperation)mutableCopy);
       return mutableCopy;
 }
Ejemplo n.º 34
0
 public override void TraverseChildren(ILeftShift leftShift)
 {
     MethodEnter(leftShift);
     base.TraverseChildren(leftShift);
     MethodExit();
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Visits the specified left shift.
 /// </summary>
 /// <param name="leftShift">The left shift.</param>
 public override void Visit(ILeftShift leftShift)
 {
     LeftShift mutableLeftShift = leftShift as LeftShift;
     if (mutableLeftShift == null) {
       this.resultExpression = leftShift;
       return;
     }
     this.resultExpression = this.myCodeMutator.Visit(mutableLeftShift);
 }