pub struct CodeGen { /* private fields */ }Implementations§
Source§impl CodeGen
impl CodeGen
Sourcepub fn codegen_program(
&mut self,
program: &Program,
type_map: HashMap<usize, Type>,
statement_types: HashMap<(String, usize), Type>,
) -> Result<String, CodeGenError>
pub fn codegen_program( &mut self, program: &Program, type_map: HashMap<usize, Type>, statement_types: HashMap<(String, usize), Type>, ) -> Result<String, CodeGenError>
Generate LLVM IR for entire program
Sourcepub fn codegen_program_with_config(
&mut self,
program: &Program,
type_map: HashMap<usize, Type>,
statement_types: HashMap<(String, usize), Type>,
config: &CompilerConfig,
) -> Result<String, CodeGenError>
pub fn codegen_program_with_config( &mut self, program: &Program, type_map: HashMap<usize, Type>, statement_types: HashMap<(String, usize), Type>, config: &CompilerConfig, ) -> Result<String, CodeGenError>
Generate LLVM IR for entire program with custom configuration
This allows external projects to extend the compiler with additional builtins that will be declared and callable from Seq code.
Sourcepub fn codegen_program_with_ffi(
&mut self,
program: &Program,
type_map: HashMap<usize, Type>,
statement_types: HashMap<(String, usize), Type>,
config: &CompilerConfig,
ffi_bindings: &FfiBindings,
) -> Result<String, CodeGenError>
pub fn codegen_program_with_ffi( &mut self, program: &Program, type_map: HashMap<usize, Type>, statement_types: HashMap<(String, usize), Type>, config: &CompilerConfig, ffi_bindings: &FfiBindings, ) -> Result<String, CodeGenError>
Generate LLVM IR for entire program with FFI support
This is the main entry point for compiling programs that use FFI.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeGen
impl RefUnwindSafe for CodeGen
impl Send for CodeGen
impl Sync for CodeGen
impl Unpin for CodeGen
impl UnwindSafe for CodeGen
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