pub struct IrModule {
pub header: IrHeader,
pub strings: StringTable,
pub slots: SlotTable,
pub opcodes: Vec<u8>,
pub islands: IslandTableParsed,
}Expand description
A fully parsed and validated IR module, ready for walking.
Fields§
§header: IrHeader§strings: StringTable§slots: SlotTable§opcodes: Vec<u8>Raw opcode stream; the walker interprets it on the fly.
islands: IslandTableParsedImplementations§
Source§impl IrModule
impl IrModule
Sourcepub fn parse(data: &[u8]) -> Result<Self, IrError>
pub fn parse(data: &[u8]) -> Result<Self, IrError>
Parse a complete FMIR binary into a validated IrModule.
Sourcepub fn validate(&self) -> Result<(), IrError>
pub fn validate(&self) -> Result<(), IrError>
Validate cross-table references within the module.
Sourcepub fn slot_id_by_name(&self, name: &str) -> Option<u16>
pub fn slot_id_by_name(&self, name: &str) -> Option<u16>
Look up a slot ID by its name. Returns None if no slot with that name exists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IrModule
impl RefUnwindSafe for IrModule
impl Send for IrModule
impl Sync for IrModule
impl Unpin for IrModule
impl UnsafeUnpin for IrModule
impl UnwindSafe for IrModule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more