use crate::lib::std::vec::Vec;
use crate::SourceLoc;
use rkyv::{Archive, Deserialize as RkyvDeserialize, Serialize as RkyvSerialize};
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
#[derive(RkyvSerialize, RkyvDeserialize, Archive, Debug, Clone, Copy, PartialEq, Eq)]
#[archive_attr(derive(rkyv::CheckBytes, Debug))]
pub struct InstructionAddressMap {
pub srcloc: SourceLoc,
pub code_offset: usize,
pub code_len: usize,
}
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
#[derive(RkyvSerialize, RkyvDeserialize, Archive, Debug, Clone, PartialEq, Eq, Default)]
#[archive_attr(derive(rkyv::CheckBytes, Debug))]
pub struct FunctionAddressMap {
pub instructions: Vec<InstructionAddressMap>,
pub start_srcloc: SourceLoc,
pub end_srcloc: SourceLoc,
pub body_offset: usize,
pub body_len: usize,
}