pulley_interpreter/
profile_disabled.rs

1//! Stubs for when profiling is disabled to have the "executing_pc" field
2//! basically compiled away.
3
4use core::marker;
5
6#[derive(Default, Clone)]
7pub(crate) struct ExecutingPc;
8
9impl ExecutingPc {
10    pub(crate) fn as_ref(&self) -> ExecutingPcRef<'_> {
11        ExecutingPcRef {
12            _marker: marker::PhantomData,
13        }
14    }
15
16    pub(crate) fn set_done(&self) {}
17}
18
19#[derive(Copy, Clone)]
20#[repr(transparent)]
21pub(crate) struct ExecutingPcRef<'a> {
22    _marker: marker::PhantomData<&'a ()>,
23}
24
25impl ExecutingPcRef<'_> {
26    pub(crate) fn record(&self, pc: usize) {
27        let _ = pc;
28    }
29}