pub enum Region {
Basic {
block: usize,
},
Seq(Vec<Region>),
If {
block: usize,
cond: Expr,
then_r: Box<Region>,
else_r: Box<Region>,
follow: Option<usize>,
ternary: Option<(Expr, Expr)>,
},
Loop {
header: usize,
body: Box<Region>,
members: HashSet<usize>,
exits: Vec<usize>,
},
Switch {
block: usize,
selector: Expr,
cases: Vec<(Vec<i64>, Region)>,
default: Option<Box<Region>>,
follow: Option<usize>,
},
Try {
group_idx: usize,
body: Box<Region>,
catches: Vec<(Vec<String>, usize, Box<Region>)>,
},
Goto {
target: usize,
},
CopyStmts {
block: usize,
},
Empty,
}Variants§
Basic
Statements of one basic block; terminal handled by the enclosing region.
Seq(Vec<Region>)
If
Fields
Loop
Switch
Fields
Try
Fields
Goto
Jump to a block outside the current region (resolved later).
CopyStmts
Duplicate of an already-claimed pure block’s statements (shared value block reached from multiple branches).
Empty
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnsafeUnpin for Region
impl UnwindSafe for Region
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