public override void Visit(IPointerCall pointerCall)
 {
     if (Process(pointerCall))
     {
         visitor.Visit(pointerCall);
     }
     base.Visit(pointerCall);
 }
Example #2
0
        public override void TraverseChildren(IPointerCall pointerCall)
        {
            IFunctionPointerTypeReference pointerType = (IFunctionPointerTypeReference)pointerCall.Pointer.Type;

            this.Traverse(pointerCall.Pointer);
            ((Expression)pointerCall.Pointer).Type = pointerType;
            this.Traverse(pointerCall.Arguments);
            ((PointerCall)pointerCall).Type = pointerType.Type;
        }
Example #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="pointerCall"></param>
 public PointerCall(IPointerCall pointerCall)
     : base(pointerCall)
 {
     Contract.Requires(pointerCall != null);
       this.arguments = new List<IExpression>(pointerCall.Arguments);
       this.pointer = pointerCall.Pointer;
 }
Example #4
0
 public void Visit(IPointerCall pointerCall)
 {
     Contract.Requires(pointerCall != null);
       throw new NotImplementedException();
 }
Example #5
0
 public void Visit(IPointerCall pointerCall)
 {
     this.traverser.Traverse(pointerCall);
 }
Example #6
0
 /// <summary>
 /// Traverses the pointer call.
 /// </summary>
 public void Traverse(IPointerCall pointerCall)
 {
     Contract.Requires(pointerCall != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(pointerCall);
       if (this.StopTraversal) return;
       this.TraverseChildren(pointerCall);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(pointerCall);
 }
Example #7
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual void Visit(IPointerCall pointerCall)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(pointerCall);
       this.Visit(pointerCall.Arguments);
       this.Visit(pointerCall.Pointer);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not decrease this.path.Count.
       this.path.Pop();
 }
        public override void TraverseChildren(IPointerCall pointerCall)
{ MethodEnter(pointerCall);
            base.TraverseChildren(pointerCall);
     MethodExit();   }
Example #9
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 public override void Visit(IPointerCall pointerCall)
 {
     base.Visit(pointerCall);
     this.AddAssertion(this.GetPointerValidationCall(pointerCall.Pointer));
 }
 /// <summary>
 /// Rewrites the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual IExpression Rewrite(IPointerCall pointerCall)
 {
     return pointerCall;
 }
Example #11
0
 public override void Visit(IPointerCall pointerCall)
 {
     allElements.Add(new InvokInfo(Traverser, "IPointerCall", pointerCall));
 }
Example #12
0
 /// <summary>
 /// Generates IL for the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 public override void TraverseChildren(IPointerCall pointerCall)
 {
     this.Traverse(pointerCall.Arguments);
       this.Traverse(pointerCall.Pointer);
       this.generator.Emit(OperationCode.Calli, pointerCall.Pointer.Type);
       this.StackSize -= (ushort)IteratorHelper.EnumerableCount(pointerCall.Arguments);
       if (pointerCall.Type.TypeCode == PrimitiveTypeCode.Void)
     this.StackSize--;
 }
 public override void Visit(IPointerCall pointerCall)
 {
     if(Process(pointerCall)){visitor.Visit(pointerCall);}
     base.Visit(pointerCall);
 }
Example #14
0
 public void Visit(IPointerCall pointerCall)
 {
     this.result = this.rewriter.Rewrite(pointerCall);
 }
 public virtual void onASTElement(IPointerCall pointerCall) { }
Example #16
0
 /// <summary>
 /// Rewrites the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual IExpression Rewrite(IPointerCall pointerCall)
 {
     var mutablePointerCall = pointerCall as PointerCall;
       if (mutablePointerCall == null) return pointerCall;
       this.RewriteChildren(mutablePointerCall);
       return mutablePointerCall;
 }
Example #17
0
 public override void TraverseChildren(IPointerCall pointerCall) {
   IFunctionPointerTypeReference pointerType = (IFunctionPointerTypeReference)pointerCall.Pointer.Type;
   this.Traverse(pointerCall.Pointer);
   ((Expression)pointerCall.Pointer).Type = pointerType;
   this.Traverse(pointerCall.Arguments);
   ((PointerCall)pointerCall).Type = pointerType.Type;
 }
Example #18
0
 public virtual void onASTElement(IPointerCall pointerCall)
 {
 }
Example #19
0
    /// <summary>
    /// Returns a shallow copy of the given pointer call.
    /// </summary>
    /// <param name="pointerCall"></param>
    public PointerCall Copy(IPointerCall pointerCall) {
      Contract.Requires(pointerCall != null);
      Contract.Ensures(Contract.Result<PointerCall>() != null);

      return new PointerCall(pointerCall);
    }
Example #20
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 public override void Visit(IPointerCall pointerCall)
 {
     base.Visit(pointerCall);
       this.AddAssertion(this.GetPointerValidationCall(pointerCall.Pointer));
 }
Example #21
0
    /// <summary>
    /// Returns a deep copy of the given pointer call.
    /// </summary>
    /// <param name="pointerCall"></param>
    public PointerCall Copy(IPointerCall pointerCall) {
      Contract.Requires(pointerCall != null);
      Contract.Ensures(Contract.Result<PointerCall>() != null);

      var mutableCopy = this.shallowCopier.Copy(pointerCall);
      this.CopyChildren((Expression)mutableCopy);
      mutableCopy.Pointer = this.Copy(mutableCopy.Pointer);
      mutableCopy.Arguments = this.Copy(mutableCopy.Arguments);
      return mutableCopy;
    }
Example #22
0
 /// <summary>
 /// Performs some computation with the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual void Visit(IPointerCall pointerCall)
 {
 }
 /// <summary>
 /// Performs some computation with the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual void Visit(IPointerCall pointerCall)
 {
 }
Example #24
0
 /// <summary>
 /// Traverses the children of the pointer call.
 /// </summary>
 public virtual void TraverseChildren(IPointerCall pointerCall)
 {
     Contract.Requires(pointerCall != null);
       this.TraverseChildren((IExpression)pointerCall);
       if (this.StopTraversal) return;
       this.Traverse(pointerCall.Pointer);
       if (this.StopTraversal) return;
       this.Traverse(pointerCall.Arguments);
 }
Example #25
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 public override void Visit(IPointerCall pointerCall)
 {
     PointerCall mutablePointerCall = new PointerCall(pointerCall);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutablePointerCall);
 }
Example #26
0
 /// <summary>
 /// Performs some computation with the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public virtual void Visit(IPointerCall pointerCall)
 {
     this.Visit((IExpression)pointerCall);
 }
Example #27
0
 /// <summary>
 /// Returns a deep copy of the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public PointerCall Copy(IPointerCall pointerCall)
 {
     var mutableCopy = this.shallowCopier.Copy(pointerCall);
       this.CopyChildren((Expression)mutableCopy);
       mutableCopy.Pointer = this.Copy(mutableCopy.Pointer);
       mutableCopy.Arguments = this.Copy(mutableCopy.Arguments);
       return mutableCopy;
 }
Example #28
0
 public void Visit(IPointerCall pointerCall)
 {
     throw new NotImplementedException();
 }
Example #29
0
 /// <summary>
 /// Returns a shallow copy of the given pointer call.
 /// </summary>
 /// <param name="pointerCall"></param>
 public PointerCall Copy(IPointerCall pointerCall)
 {
     return new PointerCall(pointerCall);
 }
 public override void TraverseChildren(IPointerCall pointerCall) {
   base.TraverseChildren(pointerCall);
 }
Example #31
0
 public void Visit(IPointerCall pointerCall)
 {
     this.result = this.copier.Copy(pointerCall);
 }
Example #32
0
 public override void TraverseChildren(IPointerCall pointerCall)
 {
     MethodEnter(pointerCall);
     base.TraverseChildren(pointerCall);
     MethodExit();
 }
Example #33
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 public override void Visit(IPointerCall pointerCall)
 {
     PointerCall mutablePointerCall = pointerCall as PointerCall;
     if (alwaysMakeACopy || mutablePointerCall == null) mutablePointerCall = new PointerCall(pointerCall);
     this.resultExpression = this.myCodeMutator.Visit(mutablePointerCall);
 }