public override void Visit(IDupValue dupValue)
 {
     if (Process(dupValue))
     {
         visitor.Visit(dupValue);
     }
     base.Visit(dupValue);
 }
Пример #2
0
        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");
 }
Пример #4
0
 public void Visit(IDupValue dupValue)
 {
     throw new NotImplementedException();
 }
Пример #5
0
 /// <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);
 }
Пример #6
0
 /// <summary>
 /// Traverses the children of the dup value expression.
 /// </summary>
 public virtual void TraverseChildren(IDupValue dupValue)
 {
     Contract.Requires(dupValue != null);
       this.TraverseChildren((IExpression)dupValue);
 }
Пример #7
0
 /// <summary>
 /// Performs some computation with the given dup value expression.
 /// </summary>
 /// <param name="dupValue"></param>
 public virtual void Visit(IDupValue dupValue)
 {
 }
Пример #8
0
        public override void TraverseChildren(IDupValue dupValue)
{ MethodEnter(dupValue);
            base.TraverseChildren(dupValue);
     MethodExit();   }
Пример #9
0
 public virtual void onASTElement(IDupValue dupValue)
 {
 }
Пример #10
0
    //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;
 }
Пример #12
0
 public override void Visit(IDupValue dupValue)
 {
     allElements.Add(new InvokInfo(Traverser, "IDupValue", dupValue));
 }
Пример #13
0
 /// <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);
 }
Пример #15
0
 public void Visit(IDupValue dupValue)
 {
     this.result = this.rewriter.Rewrite((DupValue)dupValue);
 }
Пример #16
0
 /// <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;
 }
Пример #17
0
 /// <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);
 }
Пример #18
0
    /// <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;
    }
Пример #19
0
 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;
 }
Пример #20
0
    /// <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);
    }
Пример #21
0
 //^ 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>
 /// Performs some computation with the given dup value expression.
 /// </summary>
 /// <param name="dupValue"></param>
 public virtual void Visit(IDupValue dupValue)
 {
 }
Пример #23
0
 /// <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);
 }
Пример #24
0
 /// <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);
 }
Пример #25
0
 public void Visit(IDupValue dupValue)
 {
     this.traverser.Traverse(dupValue);
 }
Пример #26
0
 /// <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;
 }
Пример #27
0
 public void Visit(IDupValue dupValue)
 {
     Contract.Requires(dupValue != null);
       throw new NotImplementedException();
 }
Пример #28
0
 /// <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);
 }
Пример #29
0
 /// <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)
 {
 }
Пример #30
0
 public void Visit(IDupValue dupValue)
 {
     this.result = this.copier.Copy(dupValue);
 }
Пример #31
0
 public virtual void onASTElement(IDupValue dupValue) { }
 public override void TraverseChildren(IDupValue dupValue) {
   var e = this.sink.operandStack.Peek();
   this.TranslatedExpressions.Push(e);
 }
Пример #33
0
 public override void TraverseChildren(IDupValue dupValue)
 {
     MethodEnter(dupValue);
     base.TraverseChildren(dupValue);
     MethodExit();
 }
Пример #34
0
 /// <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);
 }