public override void Visit(IPointerCall pointerCall)
 {
     if (Process(pointerCall))
     {
         visitor.Visit(pointerCall);
     }
     base.Visit(pointerCall);
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
 public void Visit(IPointerCall pointerCall)
 {
     Contract.Requires(pointerCall != null);
       throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public void Visit(IPointerCall pointerCall)
 {
     this.traverser.Traverse(pointerCall);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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();
 }
Exemplo n.º 8
0
        public override void TraverseChildren(IPointerCall pointerCall)
{ MethodEnter(pointerCall);
            base.TraverseChildren(pointerCall);
     MethodExit();   }
Exemplo n.º 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;
 }
Exemplo n.º 11
0
 public override void Visit(IPointerCall pointerCall)
 {
     allElements.Add(new InvokInfo(Traverser, "IPointerCall", pointerCall));
 }
Exemplo n.º 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);
 }
Exemplo n.º 14
0
 public void Visit(IPointerCall pointerCall)
 {
     this.result = this.rewriter.Rewrite(pointerCall);
 }
Exemplo n.º 15
0
 public virtual void onASTElement(IPointerCall pointerCall) { }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 18
0
 public virtual void onASTElement(IPointerCall pointerCall)
 {
 }
Exemplo n.º 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);
    }
Exemplo n.º 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));
 }
Exemplo n.º 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;
    }
Exemplo n.º 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)
 {
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 28
0
 public void Visit(IPointerCall pointerCall)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 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);
 }
Exemplo n.º 31
0
 public void Visit(IPointerCall pointerCall)
 {
     this.result = this.copier.Copy(pointerCall);
 }
Exemplo n.º 32
0
 public override void TraverseChildren(IPointerCall pointerCall)
 {
     MethodEnter(pointerCall);
     base.TraverseChildren(pointerCall);
     MethodExit();
 }
Exemplo n.º 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);
 }