public override Expression VisitUnaryExpression(UnaryExpression unaryExpression) { if (unaryExpression == null) return null; unaryExpression = (UnaryExpression)base.VisitUnaryExpression((UnaryExpression)unaryExpression.Clone()); return unaryExpression; }
/// <summary> /// </summary> /// <param name="expression">Cloned</param> public override Expression VisitUnaryExpression(UnaryExpression expression) { expression = (UnaryExpression)expression.Clone(); switch(expression.NodeType) { case NodeType.Ldtoken: return expression; case NodeType.Ldftn: expression.Operand = (Expression)this.Visit(expression.Operand); return expression; case NodeType.AddressOf: case NodeType.ReadOnlyAddressOf: case NodeType.OutAddress: // alias of AddressOf case NodeType.RefAddress: // alias of AddressOf expression.Operand = simplify_addressof_operand(expression.Operand); return expression; } expression.Operand = simplify(expression.Operand); return expression; }
public override Expression VisitPopExpr(UnaryExpression unex) { Expression operand = (Expression)this.Visit(unex.Operand); unex = (UnaryExpression)unex.Clone(); unex.Operand = operand; return unex; }
public override Expression VisitUnaryExpression(UnaryExpression unaryExpression) { if (unaryExpression == null) return null; unaryExpression = (UnaryExpression)unaryExpression.Clone(); unaryExpression.Operand = this.VisitExpression(unaryExpression.Operand); return unaryExpression; }