public override void Visit(ISizeOf sizeOf)
 {
     if (Process(sizeOf))
     {
         visitor.Visit(sizeOf);
     }
     base.Visit(sizeOf);
 }
Beispiel #2
0
 public void Visit(ISizeOf sizeOf)
 {
     Contract.Requires(sizeOf != null);
       throw new NotImplementedException();
 }
Beispiel #3
0
 public void Visit(ISizeOf sizeOf)
 {
     this.traverser.Traverse(sizeOf);
 }
Beispiel #4
0
 /// <summary>
 /// Traverses the sizeof() expression.
 /// </summary>
 public void Traverse(ISizeOf sizeOf)
 {
     Contract.Requires(sizeOf != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(sizeOf);
       if (this.StopTraversal) return;
       this.TraverseChildren(sizeOf);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(sizeOf);
 }
Beispiel #5
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual void Visit(ISizeOf sizeOf)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(sizeOf);
       this.Visit(sizeOf.TypeToSize);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count.
       this.path.Pop();
 }
Beispiel #6
0
 public virtual void onASTElement(ISizeOf sizeOf)
 {
 }
Beispiel #7
0
 /// <summary>
 /// Returns a shallow copy of the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public SizeOf Copy(ISizeOf sizeOf)
 {
     return new SizeOf(sizeOf);
 }
Beispiel #8
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void Visit(ISizeOf sizeOf)
 {
     SizeOf mutableSizeOf = sizeOf as SizeOf;
     if (alwaysMakeACopy || mutableSizeOf == null) mutableSizeOf = new SizeOf(sizeOf);
     this.resultExpression = this.myCodeMutator.Visit(mutableSizeOf);
 }
Beispiel #9
0
 /// <summary>
 /// Generates IL for the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void TraverseChildren(ISizeOf sizeOf)
 {
     this.generator.Emit(OperationCode.Sizeof, sizeOf.TypeToSize);
       this.StackSize++;
 }
 public override void Visit(ISizeOf sizeOf)
 {
     if(Process(sizeOf)){visitor.Visit(sizeOf);}
     base.Visit(sizeOf);
 }
Beispiel #11
0
 private HLLocation ProcessSizeOfExpression(ISizeOf pExpression)
 {
     return(HLSizeOfLocation.Create(HLDomain.GetOrCreateType(pExpression.TypeToSize)));
 }
Beispiel #12
0
 private HLLocation ProcessSizeOfExpression(ISizeOf pExpression)
 {
     return HLSizeOfLocation.Create(HLDomain.GetOrCreateType(pExpression.TypeToSize));
 }
Beispiel #13
0
 public void Visit(ISizeOf sizeOf)
 {
     this.result = this.rewriter.Rewrite(sizeOf);
 }
Beispiel #14
0
 /// <summary>
 /// Rewrites the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual IExpression Rewrite(ISizeOf sizeOf)
 {
     var mutableSizeOf = sizeOf as SizeOf;
       if (mutableSizeOf == null) return sizeOf;
       this.RewriteChildren(mutableSizeOf);
       return mutableSizeOf;
 }
Beispiel #15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sizeOf"></param>
 public SizeOf(ISizeOf sizeOf)
     : base(sizeOf)
 {
     this.typeToSize = sizeOf.TypeToSize;
 }
 public virtual void onASTElement(ISizeOf sizeOf) { }
Beispiel #17
0
 public override void TraverseChildren(ISizeOf sizeOf)
 {
     base.TraverseChildren(sizeOf);
     ((SizeOf)sizeOf).Type = this.platformType.SystemInt32;
 }
Beispiel #18
0
 /// <summary>
 /// Returns a deep copy of the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public SizeOf Copy(ISizeOf sizeOf)
 {
     var mutableCopy = this.shallowCopier.Copy(sizeOf);
       this.CopyChildren((Expression)mutableCopy);
       mutableCopy.TypeToSize = this.Copy(mutableCopy.TypeToSize);
       return mutableCopy;
 }
Beispiel #19
0
 public override void Visit(ISizeOf sizeOf)
 {
     allElements.Add(new InvokInfo(Traverser, "ISizeOf", sizeOf));
 }
Beispiel #20
0
 public void Visit(ISizeOf sizeOf)
 {
     this.result = this.copier.Copy(sizeOf);
 }
 /// <summary>
 /// Rewrites the given sizeof(); expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual IExpression Rewrite(ISizeOf sizeOf)
 {
     return sizeOf;
 }
        public override void TraverseChildren(ISizeOf sizeOf)
{ MethodEnter(sizeOf);
            base.TraverseChildren(sizeOf);
     MethodExit();   }
 public BenchMarkMiddleWare(ISizeOf sizeoff, RequestDelegate next)
 {
     _sizeof = sizeoff;
     _next   = next;
 }
Beispiel #24
0
 /// <summary>
 /// Performs some computation with the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual void Visit(ISizeOf sizeOf)
 {
 }
 public override void TraverseChildren(ISizeOf sizeOf) {
   base.TraverseChildren(sizeOf);
   ((SizeOf)sizeOf).Type = this.platformType.SystemInt32;
 }
Beispiel #26
0
 /// <summary>
 /// Traverses the children of the sizeof() expression.
 /// </summary>
 public virtual void TraverseChildren(ISizeOf sizeOf)
 {
     Contract.Requires(sizeOf != null);
       this.TraverseChildren((IExpression)sizeOf);
       if (this.StopTraversal) return;
       this.Traverse(sizeOf.TypeToSize);
 }
Beispiel #27
0
    /// <summary>
    /// Returns a shallow copy of the given sizeof() expression.
    /// </summary>
    /// <param name="sizeOf"></param>
    public SizeOf Copy(ISizeOf sizeOf) {
      Contract.Requires(sizeOf != null);
      Contract.Ensures(Contract.Result<SizeOf>() != null);

      return new SizeOf(sizeOf);
    }
Beispiel #28
0
 /// <summary>
 /// Performs some computation with the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual void Visit(ISizeOf sizeOf)
 {
     this.Visit((IExpression)sizeOf);
 }
Beispiel #29
0
    /// <summary>
    /// Returns a deep copy of the given sizeof() expression.
    /// </summary>
    /// <param name="sizeOf"></param>
    public SizeOf Copy(ISizeOf sizeOf) {
      Contract.Requires(sizeOf != null);
      Contract.Ensures(Contract.Result<SizeOf>() != null);

      var mutableCopy = this.shallowCopier.Copy(sizeOf);
      this.CopyChildren((Expression)mutableCopy);
      mutableCopy.TypeToSize = this.Copy(mutableCopy.TypeToSize);
      return mutableCopy;
    }
Beispiel #30
0
 public void Visit(ISizeOf sizeOf)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Performs some computation with the given sizeof() expression.
 /// </summary>
 /// <param name="sizeOf"></param>
 public virtual void Visit(ISizeOf sizeOf)
 {
 }
 public override void TraverseChildren(ISizeOf sizeOf) {
   this.sourceEmitterOutput.Write("sizeOf(");
   this.PrintTypeReference(sizeOf.TypeToSize);
   this.sourceEmitterOutput.Write(")");
 }
Beispiel #33
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void Visit(ISizeOf sizeOf)
 {
     SizeOf mutableSizeOf = new SizeOf(sizeOf);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableSizeOf);
 }
Beispiel #34
0
 public override void TraverseChildren(ISizeOf sizeOf)
 {
     MethodEnter(sizeOf);
     base.TraverseChildren(sizeOf);
     MethodExit();
 }
Beispiel #35
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void Visit(ISizeOf sizeOf)
 {
     SizeOf mutableSizeOf = sizeOf as SizeOf;
     if (mutableSizeOf == null) {
       this.resultExpression = sizeOf;
       return;
     }
     this.resultExpression = this.myCodeMutator.Visit(mutableSizeOf);
 }