public override void Visit(ILeftShift leftShift)
 {
     if (Process(leftShift))
     {
         visitor.Visit(leftShift);
     }
     base.Visit(leftShift);
 }
Exemple #2
0
 public void Visit(ILeftShift leftShift)
 {
     Contract.Requires(leftShift != null);
       throw new NotImplementedException();
 }
Exemple #3
0
 public void Visit(ILeftShift leftShift)
 {
     this.traverser.Traverse(leftShift);
 }
Exemple #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);
 }
Exemple #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();
 }
Exemple #6
0
 public virtual void onASTElement(ILeftShift leftShift)
 {
 }
Exemple #7
0
 public void Visit(ILeftShift leftShift)
 {
     this.result = this.copier.Copy(leftShift);
 }
Exemple #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);
 }
Exemple #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--;
 }
Exemple #10
0
 public override IExpression Rewrite(ILeftShift operation)
 {
     return(ReplaceOperation(operation));
 }
Exemple #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);
 }
Exemple #13
0
 public void Visit(ILeftShift leftShift)
 {
     this.result = this.rewriter.Rewrite(leftShift);
 }
Exemple #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;
 }
Exemple #15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="leftShift"></param>
 public LeftShift(ILeftShift leftShift)
     : base(leftShift)
 {
 }
 public virtual void onASTElement(ILeftShift leftShift) { }
Exemple #17
0
 public override void TraverseChildren(ILeftShift leftShift)
 {
     base.TraverseChildren(leftShift);
     ((LeftShift)leftShift).Type = leftShift.LeftOperand.Type;
 }
Exemple #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);
 }
Exemple #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;
 }
        public override void TraverseChildren(ILeftShift leftShift)
{ MethodEnter(leftShift);
            base.TraverseChildren(leftShift);
     MethodExit();   }
 public override void TraverseChildren(ILeftShift leftShift) {
   base.TraverseChildren(leftShift);
   ((LeftShift)leftShift).Type = leftShift.LeftOperand.Type;
 }
Exemple #24
0
 /// <summary>
 /// Performs some computation with the given left shift expression.
 /// </summary>
 /// <param name="leftShift"></param>
 public virtual void Visit(ILeftShift leftShift)
 {
 }
Exemple #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;
    }
Exemple #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);
 }
Exemple #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);
    }
Exemple #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)
 {
 }
Exemple #30
0
 public void Visit(ILeftShift leftShift)
 {
     throw new NotImplementedException();
 }
Exemple #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;
    }
Exemple #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;
 }
Exemple #34
0
 public override void TraverseChildren(ILeftShift leftShift)
 {
     MethodEnter(leftShift);
     base.TraverseChildren(leftShift);
     MethodExit();
 }
Exemple #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);
 }