Function
calls
(
func: &'a Function,
func_to_index: &'a FxHashMap<Word, usize>,
)
Source from the content-addressed store, hash-verified
| 259 | } |
| 260 | |
| 261 | fn calls<'a>( |
| 262 | func: &'a Function, |
| 263 | func_to_index: &'a FxHashMap<Word, usize>, |
| 264 | ) -> impl Iterator<Item = usize> + 'a { |
| 265 | func.all_inst_iter() |
| 266 | .filter(|inst| inst.class.opcode == Op::FunctionCall) |
| 267 | .map(move |inst| { |
| 268 | *func_to_index |
| 269 | .get(&inst.operands[0].id_ref_any().unwrap()) |
| 270 | .unwrap() |
| 271 | }) |
| 272 | } |
| 273 | |
| 274 | match has_recursion { |
| 275 | Some(err) => Err(err), |
Tested by
no test coverage detected