stak-vm 0.12.12

Virtual machines for Stak Scheme
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{Cons, Error, Memory};

/// A profiler.
pub trait Profiler<H> {
    /// Profiles a call.
    fn profile_call(
        &mut self,
        memory: &Memory<H>,
        call_code: Cons,
        r#return: bool,
    ) -> Result<(), Error>;

    /// Profiles a return.
    fn profile_return(&mut self, memory: &Memory<H>) -> Result<(), Error>;

    /// Profiles a call.
    fn profile_event(&mut self, name: &str) -> Result<(), Error>;
}