public override void Visit(IPopValue popValue) { if (Process(popValue)) { visitor.Visit(popValue); } base.Visit(popValue); }
public override IExpression Rewrite(IPopValue popValue) { var t = popValue.Type; Contract.Assume(0 < this.locals.Count); var local = this.locals.Pop(); if (this.inThenBranch) { var depth = this.locals.Count; if (this.thenBranchPushes != null && this.thenBranchPushes.ContainsKey(depth) && local == this.thenBranchPushes[depth].Target.Definition) { this.thenBranchPushes.Remove(depth); } } var be = new BoundExpression() { Definition = local, Instance = null, Type = local.Type, }; return(be); }
public override IExpression Rewrite(IPopValue popValue) { return this.previouslyPushedExpression; }
/// <summary> /// Allocates a shallow copy of an expression that results in the value on top of the implicit operand stack and that also pops that value from the stack. /// </summary> public PopValue(IPopValue popValue) : base(popValue) { }
public override void TraverseChildren(IPopValue popValue) { this.sourceEmitterOutput.Write("pop"); }
public void Visit(IPopValue popValue) { this.traverser.Traverse(popValue); }
public void Visit(IPopValue popValue) { Contract.Requires(popValue != null); throw new NotImplementedException(); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given pop value expression. /// </summary> /// <param name="popValue"></param> public virtual void Visit(IPopValue popValue) { if (this.stopTraversal) return; }
/// <summary> /// Traverses the pop value expression. /// </summary> public void Traverse(IPopValue popValue) { Contract.Requires(popValue != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(popValue); if (this.StopTraversal) return; this.TraverseChildren(popValue); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(popValue); }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> /// <param name="popValue"></param> public override void Visit(IPopValue popValue) { PopValue mutablePopValue = popValue as PopValue; if (alwaysMakeACopy || mutablePopValue == null) mutablePopValue = new PopValue(popValue); this.resultExpression = this.myCodeMutator.Visit(mutablePopValue); }
public override IExpression Rewrite(IPopValue popValue) { var t = popValue.Type; Contract.Assume(0 < this.locals.Count); var local = this.locals.Pop(); if (this.inThenBranch) { var depth = this.locals.Count; if (this.thenBranchPushes != null && this.thenBranchPushes.ContainsKey(depth) && local == this.thenBranchPushes[depth].Target.Definition) this.thenBranchPushes.Remove(depth); } var be = new BoundExpression() { Definition = local, Instance = null, Type = local.Type, }; return be; }
public override void Visit(IPopValue popValue) { allElements.Add(new InvokInfo(Traverser, "IPopValue", popValue)); }
/// <summary> /// Rewrites the given pop value expression. /// </summary> /// <param name="popValue"></param> public virtual IExpression Rewrite(IPopValue popValue) { return popValue; }
public override IExpression Rewrite(IPopValue popValue) { return(base.Rewrite(popValue)); }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> /// <param name="popValue"></param> public override void TraverseChildren(IPopValue popValue) { //Do nothing. The containing expression or statement will consume the value. }
public override void Visit(IPopValue popValue) { if(Process(popValue)){visitor.Visit(popValue);} base.Visit(popValue); }
public void Visit(IPopValue popValue) { this.result = this.rewriter.Rewrite(popValue); }
/// <summary> /// Rewrites the given pop value expression. /// </summary> /// <param name="popValue"></param> public virtual IExpression Rewrite(IPopValue popValue) { var mutablePopValue = popValue as PopValue; if (mutablePopValue == null) return popValue; this.RewriteChildren(mutablePopValue); return mutablePopValue; }
public virtual void onASTElement(IPopValue popValue) { }
/// <summary> /// Returns a shallow copy of the given pop value expression. /// </summary> /// <param name="popValue"></param> public PopValue Copy(IPopValue popValue) { Contract.Requires(popValue != null); Contract.Ensures(Contract.Result<PopValue>() != null); return new PopValue(popValue); }
public override void TraverseChildren(IPopValue popValue) { MethodEnter(popValue); base.TraverseChildren(popValue); MethodExit(); }
/// <summary> /// Returns a deep copy of the given pop value expression. /// </summary> /// <param name="popValue"></param> public PopValue Copy(IPopValue popValue) { Contract.Requires(popValue != null); Contract.Ensures(Contract.Result<PopValue>() != null); var mutableCopy = this.shallowCopier.Copy(popValue); this.CopyChildren((Expression)popValue); return mutableCopy; }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> /// <param name="popValue"></param> public virtual void Visit(IPopValue popValue) { }
/// <summary> /// Traverses the children of the pop value expression. /// </summary> public virtual void TraverseChildren(IPopValue popValue) { Contract.Requires(popValue != null); this.TraverseChildren((IExpression)popValue); }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> public override void Visit(IPopValue popValue) { PopValue mutablePopValue = new PopValue(popValue); this.resultExpression = this.myCodeCopier.DeepCopy(mutablePopValue); }
/// <summary> /// Performs some computation with the given pop value expression. /// </summary> /// <param name="popValue"></param> public virtual void Visit(IPopValue popValue) { this.Visit((IExpression)popValue); }
/// <summary> /// Returns a deep copy of the given pop value expression. /// </summary> /// <param name="popValue"></param> public PopValue Copy(IPopValue popValue) { var mutableCopy = this.shallowCopier.Copy(popValue); this.CopyChildren((Expression)popValue); return mutableCopy; }
public void Visit(IPopValue popValue) { throw new NotImplementedException(); }
/// <summary> /// Returns a shallow copy of the given pop value expression. /// </summary> /// <param name="popValue"></param> public PopValue Copy(IPopValue popValue) { return new PopValue(popValue); }
public override void TraverseChildren(IPopValue popValue) { this.foundAPop = true; this.StopTraversal = true; }
public void Visit(IPopValue popValue) { this.result = this.copier.Copy(popValue); }
public override void TraverseChildren(IPopValue popValue) { var locExpr = this.sink.operandStack.Pop(); this.TranslatedExpressions.Push(locExpr); }
/// <summary> /// Visits the specified PopValue. /// </summary> /// <param name="popValue">The PopValue.</param> public override void Visit(IPopValue popValue) { PopValue mutablePopValue = popValue as PopValue; if (mutablePopValue == null) { this.resultExpression = popValue; return; } this.resultExpression = this.myCodeMutator.Visit(mutablePopValue); }