pub struct TailCallOptimizer { /* private fields */ }Expand description
Tail call optimizer
Implementations§
Source§impl TailCallOptimizer
impl TailCallOptimizer
Sourcepub fn is_tail_call(&self, stmt: &Stmt, func_name: &str) -> bool
pub fn is_tail_call(&self, stmt: &Stmt, func_name: &str) -> bool
Check if statement is a tail call
Sourcepub fn optimize_tail_call(&mut self, func: &FunctionDecl) -> FunctionDecl
pub fn optimize_tail_call(&mut self, func: &FunctionDecl) -> FunctionDecl
Optimize tail call to jump
Sourcepub fn optimized_count(&self) -> usize
pub fn optimized_count(&self) -> usize
Get number of optimized tail calls
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TailCallOptimizer
impl RefUnwindSafe for TailCallOptimizer
impl Send for TailCallOptimizer
impl Sync for TailCallOptimizer
impl Unpin for TailCallOptimizer
impl UnsafeUnpin for TailCallOptimizer
impl UnwindSafe for TailCallOptimizer
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
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