pub struct Compiler { /* private fields */ }
Expand description
RPN JIT compiler
Implementations§
Source§impl Compiler
impl Compiler
Sourcepub fn new(library: &Library) -> Result<Self, JitError>
pub fn new(library: &Library) -> Result<Self, JitError>
New instance of the compiler
The entries in the library are made available to the programs compiled later on.
Sourcepub fn compile(
&mut self,
program: &Program,
) -> Result<fn(f32, f32, f32, f32, f32, f32, &mut f32, &mut f32) -> f32, JitError>
pub fn compile( &mut self, program: &Program, ) -> Result<fn(f32, f32, f32, f32, f32, f32, &mut f32, &mut f32) -> f32, JitError>
Compile a Program
returning a function pointer
Sourcepub unsafe fn free_memory(self)
pub unsafe fn free_memory(self)
Free the functions built by this Compiler
SAFETY:
- None of the function pointers returned from this compiler can run at the moment this function is called or ever called again.
Auto Trait Implementations§
impl !Freeze for Compiler
impl !RefUnwindSafe for Compiler
impl Send for Compiler
impl !Sync for Compiler
impl Unpin for Compiler
impl !UnwindSafe for Compiler
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