struct ExprCSEController<'a> {
alias_generator: &'a AliasGenerator,
mask: ExprMask,
alias_counter: usize,
lambdas_params: HashSet<String>,
}Fields§
§alias_generator: &'a AliasGenerator§mask: ExprMask§alias_counter: usize§lambdas_params: HashSet<String>Implementations§
Source§impl<'a> ExprCSEController<'a>
impl<'a> ExprCSEController<'a>
fn new(alias_generator: &'a AliasGenerator, mask: ExprMask) -> Self
Trait Implementations§
Source§impl CSEController for ExprCSEController<'_>
impl CSEController for ExprCSEController<'_>
Source§fn conditional_children(node: &Expr) -> Option<(Vec<&Expr>, Vec<&Expr>)>
fn conditional_children(node: &Expr) -> Option<(Vec<&Expr>, Vec<&Expr>)>
Splits the children to normal and conditionally evaluated ones or returns
None
if all are always evaluated.fn visit_f_down(&mut self, node: &Expr)
fn visit_f_up(&mut self, node: &Expr)
fn is_valid(node: &Expr) -> bool
fn is_ignored(&self, node: &Expr) -> bool
fn generate_alias(&self) -> String
fn rewrite(&mut self, node: &Self::Node, alias: &str) -> Self::Node
fn rewrite_f_down(&mut self, node: &Expr)
fn rewrite_f_up(&mut self, node: &Expr)
Auto Trait Implementations§
impl<'a> Freeze for ExprCSEController<'a>
impl<'a> RefUnwindSafe for ExprCSEController<'a>
impl<'a> Send for ExprCSEController<'a>
impl<'a> Sync for ExprCSEController<'a>
impl<'a> Unpin for ExprCSEController<'a>
impl<'a> UnwindSafe for ExprCSEController<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more