Ejemplo n.º 1
0
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     if (Process(makeTypedReference))
     {
         visitor.Visit(makeTypedReference);
     }
     base.Visit(makeTypedReference);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public MakeTypedReference(IMakeTypedReference makeTypedReference)
     : base(makeTypedReference)
 {
     this.operand = makeTypedReference.Operand;
 }
Ejemplo n.º 3
0
 public void Visit(IMakeTypedReference makeTypedReference)
 {
     Contract.Requires(makeTypedReference != null);
       throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public void Visit(IMakeTypedReference makeTypedReference)
 {
     this.traverser.Traverse(makeTypedReference);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Traverses the make typed reference expression.
 /// </summary>
 public void Traverse(IMakeTypedReference makeTypedReference)
 {
     Contract.Requires(makeTypedReference != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(makeTypedReference);
       if (this.StopTraversal) return;
       this.TraverseChildren(makeTypedReference);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(makeTypedReference);
 }
Ejemplo n.º 6
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual void Visit(IMakeTypedReference makeTypedReference)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(makeTypedReference);
       this.Visit(makeTypedReference.Operand);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count.or operation is not implemented.");
       this.path.Pop();
 }
Ejemplo n.º 7
0
 public virtual void onASTElement(IMakeTypedReference makeTypedReference)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Returns a shallow copy of the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public MakeTypedReference Copy(IMakeTypedReference makeTypedReference)
 {
     return new MakeTypedReference(makeTypedReference);
 }
Ejemplo n.º 9
0
 public override void TraverseChildren(IMakeTypedReference makeTypedReference)
 {
     base.TraverseChildren(makeTypedReference);
     ((MakeTypedReference)makeTypedReference).Type = this.platformType.SystemTypedReference;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Generates IL for the specified make typed reference.
 /// </summary>
 /// <param name="makeTypedReference">The make typed reference.</param>
 public override void TraverseChildren(IMakeTypedReference makeTypedReference)
 {
     this.LoadAddressOf(makeTypedReference.Operand, null);
       var type = makeTypedReference.Operand.Type;
       var mptr = type as IManagedPointerTypeReference;
       if (mptr != null)
     type = mptr.TargetType;
       else {
     var ptr = type as IPointerTypeReference;
     if (ptr != null)
       type = ptr.TargetType;
       }
       this.generator.Emit(OperationCode.Mkrefany, type);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Generates IL for the specified make typed reference.
 /// </summary>
 /// <param name="makeTypedReference">The make typed reference.</param>
 public override void TraverseChildren(IMakeTypedReference makeTypedReference) {
   this.Traverse(makeTypedReference.Operand);
   var type = makeTypedReference.Operand.Type;
   var mptr = type as IManagedPointerTypeReference;
   Contract.Assume(mptr != null);
   this.generator.Emit(OperationCode.Mkrefany, mptr.TargetType);
 }
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     if(Process(makeTypedReference)){visitor.Visit(makeTypedReference);}
     base.Visit(makeTypedReference);
 }
Ejemplo n.º 13
0
 public void Visit(IMakeTypedReference makeTypedReference)
 {
     this.result = this.rewriter.Rewrite(makeTypedReference);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Rewrites the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual IExpression Rewrite(IMakeTypedReference makeTypedReference)
 {
     var mutableMakeTypedReference = makeTypedReference as MakeTypedReference;
       if (mutableMakeTypedReference == null) return makeTypedReference;
       this.RewriteChildren(mutableMakeTypedReference);
       return mutableMakeTypedReference;
 }
Ejemplo n.º 15
0
 public virtual void onASTElement(IMakeTypedReference makeTypedReference) { }
Ejemplo n.º 16
0
 /// <summary>
 /// Visits the specified make typed reference.
 /// </summary>
 /// <param name="makeTypedReference">The make typed reference.</param>
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     MakeTypedReference mutableMakeTypedReference = makeTypedReference as MakeTypedReference;
     if (alwaysMakeACopy || mutableMakeTypedReference == null) mutableMakeTypedReference = new MakeTypedReference(makeTypedReference);
     this.resultExpression = this.myCodeMutator.Visit(mutableMakeTypedReference);
 }
Ejemplo n.º 17
0
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     allElements.Add(new InvokInfo(Traverser, "IMakeTypedReference", makeTypedReference));
 }
Ejemplo n.º 18
0
 public void Visit(IMakeTypedReference makeTypedReference)
 {
     this.result = this.copier.Copy(makeTypedReference);
 }
 /// <summary>
 /// Rewrites the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual IExpression Rewrite(IMakeTypedReference makeTypedReference)
 {
     return makeTypedReference;
 }
Ejemplo n.º 20
0
        public override void TraverseChildren(IMakeTypedReference makeTypedReference)
{ MethodEnter(makeTypedReference);
            base.TraverseChildren(makeTypedReference);
     MethodExit();   }
Ejemplo n.º 21
0
 public override void TraverseChildren(IMakeTypedReference makeTypedReference) {
   base.TraverseChildren(makeTypedReference);
   ((MakeTypedReference)makeTypedReference).Type = this.platformType.SystemTypedReference;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Performs some computation with the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual void Visit(IMakeTypedReference makeTypedReference)
 {
 }
Ejemplo n.º 23
0
    /// <summary>
    /// Returns a shallow copy of the given make typed reference expression.
    /// </summary>
    /// <param name="makeTypedReference"></param>
    public MakeTypedReference Copy(IMakeTypedReference makeTypedReference) {
      Contract.Requires(makeTypedReference != null);
      Contract.Ensures(Contract.Result<MakeTypedReference>() != null);

      return new MakeTypedReference(makeTypedReference);
    }
Ejemplo n.º 24
0
 /// <summary>
 /// Traverses the children of the make typed reference expression.
 /// </summary>
 public virtual void TraverseChildren(IMakeTypedReference makeTypedReference)
 {
     Contract.Requires(makeTypedReference != null);
       this.TraverseChildren((IExpression)makeTypedReference);
       if (this.StopTraversal) return;
       this.Traverse(makeTypedReference.Operand);
 }
Ejemplo n.º 25
0
    /// <summary>
    /// Returns a deep copy of the given make typed reference expression.
    /// </summary>
    /// <param name="makeTypedReference"></param>
    public MakeTypedReference Copy(IMakeTypedReference makeTypedReference) {
      Contract.Requires(makeTypedReference != null);
      Contract.Ensures(Contract.Result<MakeTypedReference>() != null);

      var mutableCopy = this.shallowCopier.Copy(makeTypedReference);
      this.CopyChildren((Expression)mutableCopy);
      mutableCopy.Operand = this.Copy(mutableCopy.Operand);
      return mutableCopy;
    }
Ejemplo n.º 26
0
 /// <summary>
 /// Performs some computation with the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual void Visit(IMakeTypedReference makeTypedReference)
 {
     this.Visit((IExpression)makeTypedReference);
 }
 /// <summary>
 /// Performs some computation with the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public virtual void Visit(IMakeTypedReference makeTypedReference)
 {
 }
Ejemplo n.º 28
0
 public void Visit(IMakeTypedReference makeTypedReference)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Visits the specified make typed reference.
 /// </summary>
 /// <param name="makeTypedReference">The make typed reference.</param>
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     MakeTypedReference mutableMakeTypedReference = new MakeTypedReference(makeTypedReference);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableMakeTypedReference);
 }
 public override void TraverseChildren(IMakeTypedReference makeTypedReference) {
   this.sourceEmitterOutput.Write("__makeref(");
   this.Traverse(makeTypedReference.Operand);
   this.sourceEmitterOutput.Write(")");
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Returns a deep copy of the given make typed reference expression.
 /// </summary>
 /// <param name="makeTypedReference"></param>
 public MakeTypedReference Copy(IMakeTypedReference makeTypedReference)
 {
     var mutableCopy = this.shallowCopier.Copy(makeTypedReference);
       this.CopyChildren((Expression)mutableCopy);
       mutableCopy.Operand = this.Copy(mutableCopy.Operand);
       return mutableCopy;
 }
Ejemplo n.º 32
0
 public override void TraverseChildren(IMakeTypedReference makeTypedReference)
 {
     MethodEnter(makeTypedReference);
     base.TraverseChildren(makeTypedReference);
     MethodExit();
 }
Ejemplo n.º 33
0
 /// <summary>
 /// Visits the specified make typed reference.
 /// </summary>
 /// <param name="makeTypedReference">The make typed reference.</param>
 public override void Visit(IMakeTypedReference makeTypedReference)
 {
     MakeTypedReference mutableMakeTypedReference = makeTypedReference as MakeTypedReference;
     if (mutableMakeTypedReference == null) {
       this.resultExpression = makeTypedReference;
       return;
     }
     this.resultExpression = this.myCodeMutator.Visit(mutableMakeTypedReference);
 }