public override void TraverseChildren(IVectorLength vectorLength) { this.Traverse(vectorLength.Vector); this.sourceEmitterOutput.Write(".Length"); }
/// <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); }
/// <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); }
public void Visit(IVectorLength vectorLength) { throw new NotImplementedException(); }
/// <summary> /// Performs some computation with the given vector length expression. /// </summary> /// <param name="vectorLength"></param> public virtual void Visit(IVectorLength vectorLength) { }
/// <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); }
/// <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); }
public override void TraverseChildren(IVectorLength vectorLength) { MethodEnter(vectorLength); base.TraverseChildren(vectorLength); MethodExit(); }
private HLLocation ProcessVectorLengthExpression(IVectorLength pExpression) { HLLocation locationInstance = ProcessExpression(pExpression.Vector); return HLArrayLengthLocation.Create(locationInstance); }
public override void Visit(IVectorLength vectorLength) { if(Process(vectorLength)){visitor.Visit(vectorLength);} base.Visit(vectorLength); }
public void Visit(IVectorLength vectorLength) { this.result = this.rewriter.Rewrite(vectorLength); }
/// <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; }
public void Visit(IVectorLength vectorLength) { this.result = this.copier.Copy(vectorLength); }
/// <summary> /// Rewrites the given vector length expression. /// </summary> /// <param name="vectorLength"></param> public virtual IExpression Rewrite(IVectorLength vectorLength) { return vectorLength; }
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}))); }
public override void TraverseChildren(IVectorLength vectorLength) { base.TraverseChildren(vectorLength); ((VectorLength)vectorLength).Type = this.platformType.SystemIntPtr; }
//^ 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(); }
/// <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); }
/// <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); }
/// <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; }
public void Visit(IVectorLength vectorLength) { this.traverser.Traverse(vectorLength); }
/// <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); }
public void Visit(IVectorLength vectorLength) { Contract.Requires(vectorLength != null); throw new NotImplementedException(); }
/// <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; }
/// <summary> /// /// </summary> /// <param name="vectorLength"></param> public VectorLength(IVectorLength vectorLength) : base(vectorLength) { this.vector = vectorLength.Vector; }
/// <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); }
public virtual void onASTElement(IVectorLength vectorLength) { }
/// <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); }