コード例 #1
0
 public override void TraverseChildren(IVectorLength vectorLength) {
   this.Traverse(vectorLength.Vector);
   this.sourceEmitterOutput.Write(".Length");
 }
コード例 #2
0
ファイル: Mutator.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Visits the specified vector length.
 /// </summary>
 /// <param name="vectorLength">Length of the vector.</param>
 public override void Visit(IVectorLength vectorLength)
 {
     VectorLength mutableVectorLength = vectorLength as VectorLength;
     if (alwaysMakeACopy || mutableVectorLength == null) mutableVectorLength = new VectorLength(vectorLength);
     this.resultExpression = this.myCodeMutator.Visit(mutableVectorLength);
 }
コード例 #3
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 /// <summary>
 /// Performs some computation with the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual void Visit(IVectorLength vectorLength)
 {
     this.Visit((IExpression)vectorLength);
 }
コード例 #4
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 public void Visit(IVectorLength vectorLength)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 /// <summary>
 /// Performs some computation with the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual void Visit(IVectorLength vectorLength)
 {
 }
コード例 #6
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 /// <summary>
 /// Traverses the children of the vector length expression.
 /// </summary>
 public virtual void TraverseChildren(IVectorLength vectorLength)
 {
     Contract.Requires(vectorLength != null);
       this.TraverseChildren((IExpression)vectorLength);
       if (this.StopTraversal) return;
       this.Traverse(vectorLength.Vector);
 }
コード例 #7
0
ファイル: Visitor.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Generates IL for the specified vector length.
 /// </summary>
 /// <param name="vectorLength">Length of the vector.</param>
 public override void TraverseChildren(IVectorLength vectorLength)
 {
     this.Traverse(vectorLength.Vector);
       this.generator.Emit(OperationCode.Ldlen);
 }
コード例 #8
0
        public override void TraverseChildren(IVectorLength vectorLength)
{ MethodEnter(vectorLength);
            base.TraverseChildren(vectorLength);
     MethodExit();   }
コード例 #9
0
ファイル: HLMethod.cs プロジェクト: kvanberendonck/Neutron
 private HLLocation ProcessVectorLengthExpression(IVectorLength pExpression)
 {
     HLLocation locationInstance = ProcessExpression(pExpression.Vector);
     return HLArrayLengthLocation.Create(locationInstance);
 }
コード例 #10
0
 public override void Visit(IVectorLength vectorLength)
 {
     if(Process(vectorLength)){visitor.Visit(vectorLength);}
     base.Visit(vectorLength);
 }
コード例 #11
0
 /// <summary>
 /// Performs some computation with the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual void Visit(IVectorLength vectorLength)
 {
 }
コード例 #12
0
ファイル: Mutator.cs プロジェクト: riverar/devtools
 public void Visit(IVectorLength vectorLength)
 {
     this.result = this.rewriter.Rewrite(vectorLength);
 }
コード例 #13
0
ファイル: Mutator.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Rewrites the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual IExpression Rewrite(IVectorLength vectorLength)
 {
     var mutableVectorLength = vectorLength as VectorLength;
       if (mutableVectorLength == null) return vectorLength;
       this.RewriteChildren(mutableVectorLength);
       return mutableVectorLength;
 }
コード例 #14
0
ファイル: Copier.cs プロジェクト: riverar/devtools
 public void Visit(IVectorLength vectorLength)
 {
     this.result = this.copier.Copy(vectorLength);
 }
コード例 #15
0
 /// <summary>
 /// Rewrites the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual IExpression Rewrite(IVectorLength vectorLength)
 {
     return vectorLength;
 }
コード例 #16
0
 public override void TraverseChildren(IVectorLength vectorLength) {
   base.Traverse(vectorLength.Vector);
   var e = TranslatedExpressions.Pop();
   TranslatedExpressions.Push(new Bpl.NAryExpr(vectorLength.Token(), new Bpl.FunctionCall(this.sink.Heap.ArrayLengthFunction), new List<Bpl.Expr>(new Bpl.Expr[] {e})));
 }
コード例 #17
0
 public override void TraverseChildren(IVectorLength vectorLength) {
   base.TraverseChildren(vectorLength);
   ((VectorLength)vectorLength).Type = this.platformType.SystemIntPtr;
 }
コード例 #18
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public virtual void Visit(IVectorLength vectorLength)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(vectorLength);
       this.Visit(vectorLength.Vector);
       //^ 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();
 }
コード例 #19
0
ファイル: Copier.cs プロジェクト: Refresh06/visualmutator
    /// <summary>
    /// Returns a shallow copy of the given vector length expression.
    /// </summary>
    /// <param name="vectorLength"></param>
    public VectorLength Copy(IVectorLength vectorLength) {
      Contract.Requires(vectorLength != null);
      Contract.Ensures(Contract.Result<VectorLength>() != null);

      return new VectorLength(vectorLength);
    }
コード例 #20
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 /// <summary>
 /// Traverses the vector length expression.
 /// </summary>
 public void Traverse(IVectorLength vectorLength)
 {
     Contract.Requires(vectorLength != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(vectorLength);
       if (this.StopTraversal) return;
       this.TraverseChildren(vectorLength);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(vectorLength);
 }
コード例 #21
0
ファイル: Copier.cs プロジェクト: Refresh06/visualmutator
    /// <summary>
    /// Returns a deep copy of the given vector length expression.
    /// </summary>
    /// <param name="vectorLength"></param>
    public VectorLength Copy(IVectorLength vectorLength) {
      Contract.Requires(vectorLength != null);
      Contract.Ensures(Contract.Result<VectorLength>() != null);

      var mutableCopy = this.shallowCopier.Copy(vectorLength);
      this.CopyChildren((Expression)mutableCopy);
      mutableCopy.Vector = this.Copy(mutableCopy.Vector);
      return mutableCopy;
    }
コード例 #22
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 public void Visit(IVectorLength vectorLength)
 {
     this.traverser.Traverse(vectorLength);
 }
コード例 #23
0
ファイル: Copier.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Visits the specified vector length.
 /// </summary>
 /// <param name="vectorLength">Length of the vector.</param>
 public override void Visit(IVectorLength vectorLength)
 {
     VectorLength mutableVectorLength = new VectorLength(vectorLength);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableVectorLength);
 }
コード例 #24
0
ファイル: Visitors.cs プロジェクト: Refresh06/visualmutator
 public void Visit(IVectorLength vectorLength)
 {
     Contract.Requires(vectorLength != null);
       throw new NotImplementedException();
 }
コード例 #25
0
ファイル: Copier.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Returns a deep copy of the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public VectorLength Copy(IVectorLength vectorLength)
 {
     var mutableCopy = this.shallowCopier.Copy(vectorLength);
       this.CopyChildren((Expression)mutableCopy);
       mutableCopy.Vector = this.Copy(mutableCopy.Vector);
       return mutableCopy;
 }
コード例 #26
0
ファイル: Expressions.cs プロジェクト: riverar/devtools
 /// <summary>
 /// 
 /// </summary>
 /// <param name="vectorLength"></param>
 public VectorLength(IVectorLength vectorLength)
     : base(vectorLength)
 {
     this.vector = vectorLength.Vector;
 }
コード例 #27
0
ファイル: Copier.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Returns a shallow copy of the given vector length expression.
 /// </summary>
 /// <param name="vectorLength"></param>
 public VectorLength Copy(IVectorLength vectorLength)
 {
     return new VectorLength(vectorLength);
 }
コード例 #28
0
 public virtual void onASTElement(IVectorLength vectorLength) { }
コード例 #29
0
ファイル: Mutator.cs プロジェクト: riverar/devtools
 /// <summary>
 /// Visits the specified vector length.
 /// </summary>
 /// <param name="vectorLength">Length of the vector.</param>
 public override void Visit(IVectorLength vectorLength)
 {
     VectorLength mutableVectorLength = vectorLength as VectorLength;
     if (mutableVectorLength == null) {
       this.resultExpression = vectorLength;
       return;
     }
     this.resultExpression = this.myCodeMutator.Visit(mutableVectorLength);
 }