pub struct CompiledLib { /* private fields */ }Implementations§
Source§impl CompiledLib
impl CompiledLib
Sourcepub fn compile<Isa>(
code: impl AsMut<[Isa]>,
deps: &[&CompiledLib],
) -> Result<CompiledLib, CompilerError<Isa>>where
Isa: Instruction<LibId>,
pub fn compile<Isa>(
code: impl AsMut<[Isa]>,
deps: &[&CompiledLib],
) -> Result<CompiledLib, CompilerError<Isa>>where
Isa: Instruction<LibId>,
Compiles library from the provided instructions by resolving local call pointers first, and
then assembling it into a bytecode by calling [Self::assemble].
pub fn routines_count(&self) -> usize
Sourcepub fn routine(&self, no: u16) -> LibSite
pub fn routine(&self, no: u16) -> LibSite
Returns code offset for the entry point of a given routine.
§Panics
Panics if the routine with the given number is not defined
pub fn as_lib(&self) -> &Lib
pub fn into_lib(self) -> Lib
Auto Trait Implementations§
impl Freeze for CompiledLib
impl RefUnwindSafe for CompiledLib
impl Send for CompiledLib
impl Sync for CompiledLib
impl Unpin for CompiledLib
impl UnwindSafe for CompiledLib
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