// CONSIDER: These could be called from the StackSpiller where we know whether the children contain any await // expressions, thus needing a rewrite that keeps the short-circuiting behavior. We keep it here for // the time being to avoid diverging the spiller too much from what we have in LINQ. internal static Expression ReduceLogical(BinaryExpression node) { if (node.Method != null && !node.get_IsLiftedLogical()) { return ReduceLogicalMethod(node); } else if (node.Left.Type == typeof(bool?)) { return ReduceLogicalLifted(node); } else if (node.get_IsLiftedLogical()) { return node.ReduceUserdefinedLifted(); } else { return ReduceLogicalUnlifted(node); } }