pub struct ConstantFolder;Expand description
A more comprehensive constant folding pass that folds sequences of constant push + arithmetic/logic instructions into a single Push.
Implementations§
Source§impl ConstantFolder
impl ConstantFolder
Sourcepub fn fold(chunk: &BytecodeChunk) -> BytecodeChunk
pub fn fold(chunk: &BytecodeChunk) -> BytecodeChunk
Fold all constant expressions in a chunk.
Auto Trait Implementations§
impl Freeze for ConstantFolder
impl RefUnwindSafe for ConstantFolder
impl Send for ConstantFolder
impl Sync for ConstantFolder
impl Unpin for ConstantFolder
impl UnsafeUnpin for ConstantFolder
impl UnwindSafe for ConstantFolder
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