private Expression ParseGetValueOfTypedReference(IOperation currentOperation) {
   Contract.Requires(currentOperation != null);
   GetValueOfTypedReference result = new GetValueOfTypedReference();
   Contract.Assume(currentOperation.Value is ITypeReference);
   result.TargetType = (ITypeReference)currentOperation.Value;
   result.TypedReference = this.PopOperandStack();
   return result;
 }
示例#2
0
 private Expression ParseGetValueOfTypedReference(IOperation currentOperation)
 {
     GetValueOfTypedReference result = new GetValueOfTypedReference();
       result.TargetType = (ITypeReference)currentOperation.Value;
       result.TypedReference = this.PopOperandStack();
       return result;
 }
示例#3
0
 /// <summary>
 /// Visits the specified get value of typed reference.
 /// </summary>
 /// <param name="getValueOfTypedReference">The get value of typed reference.</param>
 /// <returns></returns>
 protected virtual IExpression DeepCopy(GetValueOfTypedReference getValueOfTypedReference)
 {
     getValueOfTypedReference.TypedReference = Substitute(getValueOfTypedReference.TypedReference);
       getValueOfTypedReference.TargetType = Substitute(getValueOfTypedReference.TargetType);
       getValueOfTypedReference.Type = this.Substitute(getValueOfTypedReference.Type);
       return getValueOfTypedReference;
 }
示例#4
0
 /// <summary>
 /// Visits the specified get value of typed reference.
 /// </summary>
 /// <param name="getValueOfTypedReference">The get value of typed reference.</param>
 public override void Visit(IGetValueOfTypedReference getValueOfTypedReference)
 {
     GetValueOfTypedReference mutableGetValueOfTypedReference = new GetValueOfTypedReference(getValueOfTypedReference);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableGetValueOfTypedReference);
 }
示例#5
0
 /// <summary>
 /// Rewrites the children of the given get value of typed reference expression.
 /// </summary>
 public virtual void RewriteChildren(GetValueOfTypedReference getValueOfTypedReference)
 {
     this.RewriteChildren((Expression)getValueOfTypedReference);
       getValueOfTypedReference.TypedReference = this.Rewrite(getValueOfTypedReference.TypedReference);
       getValueOfTypedReference.TargetType = this.Rewrite(getValueOfTypedReference.TargetType);
 }
示例#6
0
 /// <summary>
 /// Visits the specified get value of typed reference.
 /// </summary>
 /// <param name="getValueOfTypedReference">The get value of typed reference.</param>
 /// <returns></returns>
 public virtual IExpression Visit(GetValueOfTypedReference getValueOfTypedReference)
 {
     getValueOfTypedReference.TypedReference = Visit(getValueOfTypedReference.TypedReference);
       getValueOfTypedReference.TargetType = Visit(getValueOfTypedReference.TargetType);
       getValueOfTypedReference.Type = this.Visit(getValueOfTypedReference.Type);
       return getValueOfTypedReference;
 }
示例#7
0
 /// <summary>
 /// Visits the specified get value of typed reference.
 /// </summary>
 /// <param name="getValueOfTypedReference">The get value of typed reference.</param>
 public override void Visit(IGetValueOfTypedReference getValueOfTypedReference)
 {
     GetValueOfTypedReference mutableGetValueOfTypedReference = getValueOfTypedReference as GetValueOfTypedReference;
     if (alwaysMakeACopy || mutableGetValueOfTypedReference == null) mutableGetValueOfTypedReference = new GetValueOfTypedReference(getValueOfTypedReference);
     this.resultExpression = this.myCodeMutator.Visit(mutableGetValueOfTypedReference);
 }