Skip to main content

body_is_straight_line

Function body_is_straight_line 

Source
fn body_is_straight_line<'gcx>(
    gcx: Gcx<'_>,
    stmts: impl IntoIterator<Item = &'gcx Stmt<'gcx>>,
) -> bool
Expand description

Whether every statement of a loop body runs on one straight line: no branch, jump, terminal statement, inline assembly or nested loop (bare blocks are transparent). Any of these could let control skip a removal or the cadence step, or leave the loop before a shifted slot is read, none of which this detector tracks.