Пример #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;
 }
Пример #2
0
 private DupValue ParseDup(ITypeReference type) {
   Contract.Requires(type != null);
   var result = new DupValue() { Type = type };
   return result;
 }
Пример #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);
 }
Пример #4
0
 /// <summary>
 /// Rewrites the children of the given dup value expression.
 /// </summary>
 public virtual void RewriteChildren(DupValue dupValue)
 {
     this.RewriteChildren((Expression)dupValue);
 }
Пример #5
0
 /// <summary>
 /// Visits the specified DupValue.
 /// </summary>
 /// <param name="dupValue">The DupValue.</param>
 /// <returns></returns>
 public virtual IExpression Visit(DupValue dupValue)
 {
     return dupValue;
 }
Пример #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);
 }
Пример #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;
 }