Exemple #1
0
 /// <summary>
 /// Visits the specified dup value expression.
 /// </summary>
 /// <param name="dupValue">The dup value expression.</param>
 /// <returns></returns>
 protected virtual IExpression DeepCopy(DupValue dupValue)
 {
     dupValue.Type = this.Substitute(dupValue.Type);
       return dupValue;
 }
 private DupValue ParseDup(ITypeReference type) {
   Contract.Requires(type != null);
   var result = new DupValue() { Type = type };
   return result;
 }
Exemple #3
0
 /// <summary>
 /// Performs some computation with the given dup value expression.
 /// </summary>
 public override void Visit(IDupValue dupValue)
 {
     DupValue mutableDupValue = new DupValue(dupValue);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableDupValue);
 }
Exemple #4
0
 /// <summary>
 /// Rewrites the children of the given dup value expression.
 /// </summary>
 public virtual void RewriteChildren(DupValue dupValue)
 {
     this.RewriteChildren((Expression)dupValue);
 }
Exemple #5
0
 /// <summary>
 /// Visits the specified DupValue.
 /// </summary>
 /// <param name="dupValue">The DupValue.</param>
 /// <returns></returns>
 public virtual IExpression Visit(DupValue dupValue)
 {
     return dupValue;
 }
Exemple #6
0
 /// <summary>
 /// Performs some computation with the given dup value expression.
 /// </summary>
 /// <param name="dupValue"></param>
 public override void Visit(IDupValue dupValue)
 {
     DupValue mutableDupValue = dupValue as DupValue;
     if (alwaysMakeACopy || mutableDupValue == null) mutableDupValue = new DupValue(dupValue);
     this.resultExpression = this.myCodeMutator.Visit(mutableDupValue);
 }
Exemple #7
0
 /// <summary>
 /// Visits the specified dup value.
 /// </summary>
 /// <param name="dupValue">The dup value.</param>
 /// <returns></returns>
 public virtual IExpression Visit(DupValue dupValue)
 {
     dupValue.Type = this.Visit(dupValue.Type);
       return dupValue;
 }