pub(crate) fn bounds_check_iter<'a>(
chain: Handle<Expression>,
module: &'a Module,
function: &'a Function,
info: &'a FunctionInfo,
) -> impl Iterator<Item = BoundsCheck> + 'a
Expand description
Returns an iterator of accesses within the chain of Access
and
AccessIndex
expressions starting from chain
that may need to be
bounds-checked at runtime.
Items are yielded as BoundsCheck
instances.
Accesses through a struct are omitted, since you never need a bounds check for accessing a struct field.
If chain
isn’t an Access
or AccessIndex
expression at all, the
iterator is empty.