pub struct BasicBlock {
pub statements: Vec<Statement>,
pub terminator: Terminator,
}Expand description
Basic block - a sequence of statements ending with a terminator
Fields§
§statements: Vec<Statement>Statements in this block
terminator: TerminatorTerminator (determines control flow)
Implementations§
Source§impl BasicBlock
impl BasicBlock
Sourcepub fn new(terminator: Terminator) -> Self
pub fn new(terminator: Terminator) -> Self
Create a new basic block with a terminator
Sourcepub fn push_statement(&mut self, stmt: Statement)
pub fn push_statement(&mut self, stmt: Statement)
Add a statement to this block
Trait Implementations§
Source§impl Clone for BasicBlock
impl Clone for BasicBlock
Source§fn clone(&self) -> BasicBlock
fn clone(&self) -> BasicBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BasicBlock
impl RefUnwindSafe for BasicBlock
impl Send for BasicBlock
impl Sync for BasicBlock
impl Unpin for BasicBlock
impl UnwindSafe for BasicBlock
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