public override void Visit(IRightShift rightShift) { if (Process(rightShift)) { visitor.Visit(rightShift); } base.Visit(rightShift); }
public void Visit(IRightShift rightShift) { Contract.Requires(rightShift != null); throw new NotImplementedException(); }
public void Visit(IRightShift rightShift) { this.traverser.Traverse(rightShift); }
/// <summary> /// Traverses the right shift expression. /// </summary> public void Traverse(IRightShift rightShift) { Contract.Requires(rightShift != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(rightShift); if (this.StopTraversal) return; this.TraverseChildren(rightShift); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(rightShift); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given right shift expression. /// </summary> /// <param name="rightShift"></param> public virtual void Visit(IRightShift rightShift) { if (this.stopTraversal) return; //^ int oldCount = this.path.Count; this.path.Push(rightShift); this.Visit(rightShift.LeftOperand); this.Visit(rightShift.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(); }
public virtual void onASTElement(IRightShift rightShift) { }
public void Visit(IRightShift rightShift) { this.result = this.copier.Copy(rightShift); }
/// <summary> /// Visits the specified right shift. /// </summary> /// <param name="rightShift">The right shift.</param> public override void Visit(IRightShift rightShift) { RightShift mutableRightShift = rightShift as RightShift; if (alwaysMakeACopy || mutableRightShift == null) mutableRightShift = new RightShift(rightShift); this.resultExpression = this.myCodeMutator.Visit(mutableRightShift); }
/// <summary> /// Generates IL for the specified right shift. /// </summary> /// <param name="rightShift">The right shift.</param> public override void TraverseChildren(IRightShift rightShift) { this.Traverse(rightShift.LeftOperand); this.Traverse(rightShift.RightOperand); if (TypeHelper.IsUnsignedPrimitiveInteger(rightShift.LeftOperand.Type)) this.generator.Emit(OperationCode.Shr_Un); else this.generator.Emit(OperationCode.Shr); this.StackSize--; }
public override IExpression Rewrite(IRightShift operation) { return(ReplaceOperation(operation)); }
public override void Visit(IRightShift operation) { ProcessOperation(operation); }
public override void Visit(IRightShift rightShift) { if(Process(rightShift)){visitor.Visit(rightShift);} base.Visit(rightShift); }
public void Visit(IRightShift rightShift) { this.result = this.rewriter.Rewrite(rightShift); }
/// <summary> /// Rewrites the given right shift expression. /// </summary> /// <param name="rightShift"></param> public virtual IExpression Rewrite(IRightShift rightShift) { var mutableRightShift = rightShift as RightShift; if (mutableRightShift == null) return rightShift; this.RewriteChildren(mutableRightShift); return mutableRightShift; }
/// <summary> /// /// </summary> /// <param name="rightShift"></param> public RightShift(IRightShift rightShift) : base(rightShift) { }
public override void TraverseChildren(IRightShift rightShift) { base.TraverseChildren(rightShift); ((RightShift)rightShift).Type = rightShift.LeftOperand.Type; }
/// <summary> /// Returns a shallow copy of the given right shift expression. /// </summary> /// <param name="rightShift"></param> public RightShift Copy(IRightShift rightShift) { return new RightShift(rightShift); }
public override void Visit(IRightShift rightShift) { allElements.Add(new InvokInfo(Traverser, "IRightShift", rightShift)); }
public override void TraverseChildren(IRightShift rightShift) { var targetExpression = rightShift.LeftOperand as ITargetExpression; if (targetExpression != null) { // x >>= e bool statement = this.currentExpressionIsOpAssignStatement; this.currentExpressionIsOpAssignStatement = false; this.VisitAssignment(targetExpression, rightShift, (IExpression e) => this.TraverseRightShiftRightOperandAndDoOperation(e), treatAsStatement: statement, pushTargetRValue: true, resultIsInitialTargetRValue: rightShift.ResultIsUnmodifiedLeftOperand); } else { // x >> e this.Traverse(rightShift.LeftOperand); this.TraverseRightShiftRightOperandAndDoOperation(rightShift); } }
/// <summary> /// Rewrites the given right shift expression. /// </summary> /// <param name="rightShift"></param> public virtual IExpression Rewrite(IRightShift rightShift) { return rightShift; }
public override void TraverseChildren(IRightShift rightShift) { MethodEnter(rightShift); base.TraverseChildren(rightShift); MethodExit(); }
/// <summary> /// Performs some computation with the given right shift expression. /// </summary> /// <param name="rightShift"></param> public virtual void Visit(IRightShift rightShift) { }
/// <summary> /// Returns a shallow copy of the given right shift expression. /// </summary> /// <param name="rightShift"></param> public RightShift Copy(IRightShift rightShift) { Contract.Requires(rightShift != null); Contract.Ensures(Contract.Result<RightShift>() != null); return new RightShift(rightShift); }
/// <summary> /// Traverses the children of the right shift expression. /// </summary> public virtual void TraverseChildren(IRightShift rightShift) { Contract.Requires(rightShift != null); this.TraverseChildren((IBinaryOperation)rightShift); }
/// <summary> /// Returns a deep copy of the given right shift expression. /// </summary> /// <param name="rightShift"></param> public RightShift Copy(IRightShift rightShift) { Contract.Requires(rightShift != null); Contract.Ensures(Contract.Result<RightShift>() != null); var mutableCopy = this.shallowCopier.Copy(rightShift); this.CopyChildren((BinaryOperation)mutableCopy); return mutableCopy; }
/// <summary> /// Performs some computation with the given right shift expression. /// </summary> /// <param name="rightShift"></param> public virtual void Visit(IRightShift rightShift) { this.Visit((IBinaryOperation)rightShift); }
public void Visit(IRightShift rightShift) { throw new NotImplementedException(); }
/// <summary> /// Visits the specified right shift. /// </summary> /// <param name="rightShift">The right shift.</param> public override void Visit(IRightShift rightShift) { RightShift mutableRightShift = new RightShift(rightShift); this.resultExpression = this.myCodeCopier.DeepCopy(mutableRightShift); }
public override void TraverseChildren(IRightShift rightShift) { var needsParen = LowerPrecedenceThanParentExpression(rightShift); var savedCurrentPrecedence = this.currentPrecedence; this.currentPrecedence = this.Precedence(rightShift); if (needsParen) this.sourceEmitterOutput.Write("("); this.Traverse(rightShift.LeftOperand); if (rightShift.LeftOperand is ITargetExpression) this.sourceEmitterOutput.Write(" >>= "); else this.sourceEmitterOutput.Write(" >> "); this.Traverse(rightShift.RightOperand); if (needsParen) this.sourceEmitterOutput.Write(")"); this.currentPrecedence = savedCurrentPrecedence; }
/// <summary> /// Returns a deep copy of the given right shift expression. /// </summary> /// <param name="rightShift"></param> public RightShift Copy(IRightShift rightShift) { var mutableCopy = this.shallowCopier.Copy(rightShift); this.CopyChildren((BinaryOperation)mutableCopy); return mutableCopy; }
/// <summary> /// Visits the specified right shift. /// </summary> /// <param name="rightShift">The right shift.</param> public override void Visit(IRightShift rightShift) { RightShift mutableRightShift = rightShift as RightShift; if (mutableRightShift == null) { this.resultExpression = rightShift; return; } this.resultExpression = this.myCodeMutator.Visit(mutableRightShift); }