pub struct NativeBackend { /* private fields */ }Expand description
The native code generation backend.
Compiles LCNF modules to native IR suitable for JIT or AOT compilation.
Implementations§
Source§impl NativeBackend
impl NativeBackend
Sourcepub fn new(config: NativeEmitConfig) -> Self
pub fn new(config: NativeEmitConfig) -> Self
Create a new native backend.
Sourcepub fn default_backend() -> Self
pub fn default_backend() -> Self
Create a native backend with default configuration.
Sourcepub fn compile_module(&mut self, module: &LcnfModule) -> NativeModule
pub fn compile_module(&mut self, module: &LcnfModule) -> NativeModule
Compile an entire LCNF module to native IR.
Sourcepub fn compile_fun_decl(&mut self, decl: &LcnfFunDecl) -> NativeFunc
pub fn compile_fun_decl(&mut self, decl: &LcnfFunDecl) -> NativeFunc
Compile a single LCNF function declaration.
Sourcepub fn stats(&self) -> &NativeEmitStats
pub fn stats(&self) -> &NativeEmitStats
Get accumulated statistics.
Auto Trait Implementations§
impl Freeze for NativeBackend
impl RefUnwindSafe for NativeBackend
impl Send for NativeBackend
impl Sync for NativeBackend
impl Unpin for NativeBackend
impl UnsafeUnpin for NativeBackend
impl UnwindSafe for NativeBackend
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