pub struct AirBlock {
pub id: BlockId,
pub label: Option<String>,
pub instructions: Vec<Instruction>,
}Expand description
A basic block — a sequence of instructions with single entry/exit.
Fields§
§id: BlockIdUnique block identifier.
label: Option<String>Optional block label/name.
instructions: Vec<Instruction>Instructions in this block (last must be terminator).
Implementations§
Source§impl AirBlock
impl AirBlock
Sourcepub fn with_label(id: BlockId, label: impl Into<String>) -> Self
pub fn with_label(id: BlockId, label: impl Into<String>) -> Self
Create a block with a label.
Sourcepub fn terminator(&self) -> Option<&Instruction>
pub fn terminator(&self) -> Option<&Instruction>
Get the terminator instruction if present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AirBlock
impl<'de> Deserialize<'de> for AirBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AirBlock
Auto Trait Implementations§
impl Freeze for AirBlock
impl RefUnwindSafe for AirBlock
impl Send for AirBlock
impl Sync for AirBlock
impl Unpin for AirBlock
impl UnsafeUnpin for AirBlock
impl UnwindSafe for AirBlock
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