Exactly the same as Function::all_inst_iter, except return type is `impl DoubleEndedIterator` instead of `impl Iterator`
(func: &Function)
| 42 | // Exactly the same as Function::all_inst_iter, except return type is `impl DoubleEndedIterator` |
| 43 | // instead of `impl Iterator` |
| 44 | fn all_inst_iter(func: &Function) -> impl DoubleEndedIterator<Item = &Instruction> { |
| 45 | func.def |
| 46 | .iter() |
| 47 | .chain(func.parameters.iter()) |
| 48 | .chain( |
| 49 | func.blocks |
| 50 | .iter() |
| 51 | .flat_map(|b| b.label.iter().chain(b.instructions.iter())), |
| 52 | ) |
| 53 | .chain(func.end.iter()) |
| 54 | } |
| 55 | |
| 56 | fn spread_roots(module: &Module, rooted: &mut FxIndexSet<Word>) -> bool { |
| 57 | let mut any = false; |