public override void Visit(IDupValue dupValue) { if (Process(dupValue)) { visitor.Visit(dupValue); } base.Visit(dupValue); }
public override IExpression Rewrite(IDupValue dupValue) { var depth = this.locals.Count; var t = dupValue.Type; Contract.Assume(0 < this.locals.Count); var local = this.locals.Peek(); this.locals.Push(local); var be = new BoundExpression() { Definition = local, Instance = null, Type = t, }; return(be); }
public override void TraverseChildren(IDupValue dupValue) { this.sourceEmitterOutput.Write("dup"); }
public void Visit(IDupValue dupValue) { throw new NotImplementedException(); }
/// <summary> /// Performs some computation with the given dup value expression. /// </summary> /// <param name="dupValue"></param> public virtual void Visit(IDupValue dupValue) { this.Visit((IExpression)dupValue); }
/// <summary> /// Traverses the children of the dup value expression. /// </summary> public virtual void TraverseChildren(IDupValue dupValue) { Contract.Requires(dupValue != null); this.TraverseChildren((IExpression)dupValue); }
/// <summary> /// Performs some computation with the given dup value expression. /// </summary> /// <param name="dupValue"></param> public virtual void Visit(IDupValue dupValue) { }
public override void TraverseChildren(IDupValue dupValue) { MethodEnter(dupValue); base.TraverseChildren(dupValue); MethodExit(); }
public virtual void onASTElement(IDupValue dupValue) { }
//public override void TraverseChildren(IAddressableExpression addressableExpression) { // this.foundProblem = true; // this.StopTraversal = true; //} public override void TraverseChildren(IDupValue dupValue) { this.foundProblem = true; this.StopTraversal = true; }
/// <summary> /// Rewrites the given dup value expression. /// </summary> /// <param name="dupValue"></param> public virtual IExpression Rewrite(IDupValue dupValue) { return dupValue; }
public override void Visit(IDupValue dupValue) { allElements.Add(new InvokInfo(Traverser, "IDupValue", dupValue)); }
/// <summary> /// Performs some computation with the given dup value expression. /// </summary> /// <param name="dupValue"></param> public override void TraverseChildren(IDupValue dupValue) { this.generator.Emit(OperationCode.Dup); this.StackSize++; }
public override void Visit(IDupValue dupValue) { if(Process(dupValue)){visitor.Visit(dupValue);} base.Visit(dupValue); }
public void Visit(IDupValue dupValue) { this.result = this.rewriter.Rewrite((DupValue)dupValue); }
/// <summary> /// Rewrites the given dup value expression. /// </summary> /// <param name="dupValue"></param> public virtual IExpression Rewrite(IDupValue dupValue) { var mutableDupValue = dupValue as DupValue; if (mutableDupValue == null) return dupValue; this.RewriteChildren(mutableDupValue); return mutableDupValue; }
/// <summary> /// Performs some computation with the given dup value expression. /// </summary> /// <param name="dupValue"></param> public override void Visit(IDupValue dupValue) { DupValue mutableDupValue = dupValue as DupValue; if (alwaysMakeACopy || mutableDupValue == null) mutableDupValue = new DupValue(dupValue); this.resultExpression = this.myCodeMutator.Visit(mutableDupValue); }
/// <summary> /// Returns a deep copy of the given dup value expression. /// </summary> /// <param name="dupValue"></param> public DupValue Copy(IDupValue dupValue) { Contract.Requires(dupValue != null); Contract.Ensures(Contract.Result<DupValue>() != null); var mutableCopy = this.shallowCopier.Copy(dupValue); this.CopyChildren((Expression)mutableCopy); return mutableCopy; }
public override IExpression Rewrite(IDupValue dupValue) { var depth = this.locals.Count; var t = dupValue.Type; Contract.Assume(0 < this.locals.Count); var local = this.locals.Peek(); this.locals.Push(local); var be = new BoundExpression() { Definition = local, Instance = null, Type = t, }; return be; }
/// <summary> /// Returns a shallow copy of the given dup value expression. /// </summary> /// <param name="dupValue"></param> public DupValue Copy(IDupValue dupValue) { Contract.Requires(dupValue != null); Contract.Ensures(Contract.Result<DupValue>() != null); return new DupValue(dupValue); }
//^ ensures this.path.Count == old(this.path.Count); /// <summary> /// Traverses the given dup value expression. /// </summary> /// <param name="popValue"></param> public virtual void Visit(IDupValue popValue) { if (this.stopTraversal) return; }
/// <summary> /// Traverses the dup value expression. /// </summary> public void Traverse(IDupValue dupValue) { Contract.Requires(dupValue != null); if (this.preorderVisitor != null) this.preorderVisitor.Visit(dupValue); if (this.StopTraversal) return; this.TraverseChildren(dupValue); if (this.StopTraversal) return; if (this.postorderVisitor != null) this.postorderVisitor.Visit(dupValue); }
/// <summary> /// Performs some computation with the given dup value expression. /// </summary> public override void Visit(IDupValue dupValue) { DupValue mutableDupValue = new DupValue(dupValue); this.resultExpression = this.myCodeCopier.DeepCopy(mutableDupValue); }
public void Visit(IDupValue dupValue) { this.traverser.Traverse(dupValue); }
/// <summary> /// Returns a deep copy of the given dup value expression. /// </summary> /// <param name="dupValue"></param> public DupValue Copy(IDupValue dupValue) { var mutableCopy = this.shallowCopier.Copy(dupValue); this.CopyChildren((Expression)mutableCopy); return mutableCopy; }
public void Visit(IDupValue dupValue) { Contract.Requires(dupValue != null); throw new NotImplementedException(); }
/// <summary> /// Returns a shallow copy of the given dup value expression. /// </summary> /// <param name="dupValue"></param> public DupValue Copy(IDupValue dupValue) { return new DupValue(dupValue); }
/// <summary> /// Allocates a shallow copy of an expression that results in the value on top of the implicit operand stack. /// </summary> public DupValue(IDupValue dupValue) : base(dupValue) { }
public void Visit(IDupValue dupValue) { this.result = this.copier.Copy(dupValue); }
public override void TraverseChildren(IDupValue dupValue) { var e = this.sink.operandStack.Peek(); this.TranslatedExpressions.Push(e); }
/// <summary> /// Visits the specified DupValue. /// </summary> /// <param name="dupValue">The DupValue.</param> public override void Visit(IDupValue dupValue) { DupValue mutableDupValue = dupValue as DupValue; if (mutableDupValue == null) { this.resultExpression = dupValue; return; } this.resultExpression = this.myCodeMutator.Visit(mutableDupValue); }