Skip to main content

weir/callgraph/
tag.rs

1use super::{callgraph_build_with_count, OP_ID};
2
3/// Marker type for the callgraph dataflow primitive.
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub struct Callgraph;
6
7impl crate::soundness::SoundnessTagged for Callgraph {
8    fn soundness(&self) -> crate::soundness::Soundness {
9        crate::soundness::Soundness::MayOver
10    }
11}
12
13inventory::submit! {
14    vyre_harness::OpEntry::new(
15        OP_ID,
16        || callgraph_build_with_count("direct", "indirect", "pts", "out", 4),
17        Some(|| {
18            let u32s = crate::dispatch_decode::pack_u32;
19            vec![vec![u32s(&[0b1100]), u32s(&[0b1010]), u32s(&[0b0110]), u32s(&[0])]]
20        }),
21        Some(|| {
22            let u32s = crate::dispatch_decode::pack_u32;
23            vec![vec![u32s(&[0b1110])]]
24        }),
25    )
26}