Example #1
0
 private Expression ParsePointerCall(IOperation currentOperation)
 {
     IFunctionPointerTypeReference funcPointerRef = (IFunctionPointerTypeReference)currentOperation.Value;
       PointerCall result = new PointerCall();
       result.IsTailCall = this.sawTailCall;
       Expression pointer = this.PopOperandStack();
       pointer.Type = funcPointerRef;
       foreach (var par in funcPointerRef.Parameters)
     result.Arguments.Add(this.PopOperandStack());
       result.Arguments.Reverse();
       result.Pointer = pointer;
       this.sawTailCall = false;
       return result;
 }
Example #2
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 /// <returns></returns>
 protected virtual IExpression DeepCopy(PointerCall pointerCall)
 {
     pointerCall.Pointer = this.Substitute(pointerCall.Pointer);
       pointerCall.Arguments = this.DeepCopy(pointerCall.Arguments);
       pointerCall.Type = this.Substitute(pointerCall.Type);
       return pointerCall;
 }
Example #3
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);
 }
Example #4
0
 /// <summary>
 /// Visits the specified pointer call.
 /// </summary>
 /// <param name="pointerCall">The pointer call.</param>
 /// <returns></returns>
 public virtual IExpression Visit(PointerCall pointerCall)
 {
     pointerCall.Pointer = this.Visit(pointerCall.Pointer);
       pointerCall.Arguments = Visit(pointerCall.Arguments);
       pointerCall.Type = this.Visit(pointerCall.Type);
       return pointerCall;
 }
Example #5
0
 /// <summary>
 /// Rewrites the children of the given pointer call.
 /// </summary>
 public virtual void RewriteChildren(PointerCall pointerCall)
 {
     this.RewriteChildren((Expression)pointerCall);
       pointerCall.Pointer = this.Rewrite(pointerCall.Pointer);
       pointerCall.Arguments = this.Rewrite(pointerCall.Arguments);
 }
Example #6
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);
 }