MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / has_instruction

Function has_instruction

tests/integration/ir_generation.rs:42–54  ·  view source on GitHub ↗
(source: &str, pred: F)

Source from the content-addressed store, hash-verified

40 .any(pred)
41}
42
43fn count_instructions<F>(source: &str, pred: F) -> usize
44where
45 F: Fn(&IrInstruction) -> bool,
46{
47 let result = compile_ok(source);
48 result
49 .ir_program
50 .functions
51 .iter()
52 .flat_map(|f| f.blocks.iter())
53 .flat_map(|b| b.instructions.iter())
54 .filter(|i| pred(i))
55 .count()
56}
57

Callers

nothing calls this directly

Calls 2

anyMethod · 0.80
compile_okFunction · 0.70

Tested by

no test coverage detected