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