Struct cairo_lang_lowering::objects::FlatBlock
source · pub struct FlatBlock {
pub inputs: Vec<VariableId>,
pub statements: Vec<Statement>,
pub drops: Vec<VariableId>,
pub end: FlatBlockEnd,
}
Expand description
A block of statements. Unlike StructuredBlock
, this has no reference information,
and no panic ending.
Fields§
§inputs: Vec<VariableId>
Input variables to the block, including implicits.
statements: Vec<Statement>
Statements sequence running one after the other in the block, in a linear flow.
Note: Inner blocks might end with a return
, which will exit the function in the middle.
Note: Match is a possible statement, which means it has control flow logic inside, but
after its execution is completed, the flow returns to the following statement of the block.
drops: Vec<VariableId>
Which variables are needed to be dropped at the end of this block. Note that these are not explicitly dropped by statements.
end: FlatBlockEnd
Describes how this block ends: returns to the caller or exits the function.
Trait Implementations§
source§impl DebugWithDb<LoweredFormatter<'_>> for FlatBlock
impl DebugWithDb<LoweredFormatter<'_>> for FlatBlock
source§impl PartialEq<FlatBlock> for FlatBlock
impl PartialEq<FlatBlock> for FlatBlock
source§impl TryFrom<StructuredBlock> for FlatBlock
impl TryFrom<StructuredBlock> for FlatBlock
impl Eq for FlatBlock
impl StructuralEq for FlatBlock
impl StructuralPartialEq for FlatBlock
Auto Trait Implementations§
impl RefUnwindSafe for FlatBlock
impl Send for FlatBlock
impl Sync for FlatBlock
impl Unpin for FlatBlock
impl UnwindSafe for FlatBlock
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.