pub struct Compiler { /* private fields */ }Expand description
Compiler context.
This exists to support incremental compilation by keeping state and appending code to the image being built, which is useful in REPL scenarios.
Implementations§
Source§impl Compiler
impl Compiler
Sourcepub fn new(
upcalls: &HashMap<SymbolKey, Rc<dyn Callable>>,
global_defs: &[GlobalDef],
) -> Result<Self, Error>
pub fn new( upcalls: &HashMap<SymbolKey, Rc<dyn Callable>>, global_defs: &[GlobalDef], ) -> Result<Self, Error>
Creates a new compiler instance.
global_defs provides pre-defined global variables visible to the compiled program.
upcalls contains the metadata of all built-in callables that the compiled code can use.
Auto Trait Implementations§
impl Freeze for Compiler
impl !RefUnwindSafe for Compiler
impl !Send for Compiler
impl !Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin 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