Struct move_stackless_bytecode::loop_analysis::FatLoop
source · [−]pub struct FatLoop {
pub invariants: BTreeMap<CodeOffset, (AttrId, Exp)>,
pub val_targets: BTreeSet<TempIndex>,
pub mut_targets: BTreeMap<TempIndex, bool>,
pub back_edges: BTreeSet<CodeOffset>,
}
Expand description
A fat-loop captures the information of one or more natural loops that share the same loop header. This shared header is called the header of the fat-loop.
Conceptually, every back edge defines a unique natural loop and different back edges may points to the same loop header (e.g., when there are two “continue” statements in the loop body).
However, since these natural loops share the same loop header, they share the same loop invariants too and the fat-loop targets (i.e., variables that may be changed in any sub-loop) is the union of loop targets per each natural loop that share the header.
Fields
invariants: BTreeMap<CodeOffset, (AttrId, Exp)>
val_targets: BTreeSet<TempIndex>
mut_targets: BTreeMap<TempIndex, bool>
back_edges: BTreeSet<CodeOffset>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FatLoop
impl !Send for FatLoop
impl !Sync for FatLoop
impl Unpin for FatLoop
impl UnwindSafe for FatLoop
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more