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

Function call_count

tests/integration/struct_destructuring.rs:18–27  ·  view source on GitHub ↗
(result: &full_stack::compilation_pipeline::CompilationResult, name: &str)

Source from the content-addressed store, hash-verified

16 .ir_program
17 .functions
18 .iter()
19 .flat_map(|f| f.blocks.iter())
20 .flat_map(|b| b.instructions.iter())
21 .filter(|i| matches!(i, IrInstruction::Call { function, .. } if function == name))
22 .count()
23}
24
25// -- Small-struct ABI (function return) ---------------------------------------
26
27/// The callee must be invoked exactly once. Address mode and the spill
28/// fallback once each evaluated the rvalue, emitting two calls.
29#[test]
30fn function_return_struct_called_exactly_once() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected