Trait Backend

Source
pub trait Backend: BackendTypes + TypeMethods {
    type Builder<'a>: Builder<Type = Self::Type, Value = Self::Value, StackSlot = Self::StackSlot, BasicBlock = Self::BasicBlock, Function = Self::Function>
       where Self: 'a;
    type FuncId: Copy + Eq + Hash + Debug;

Show 17 methods // Required methods fn ir_extension(&self) -> &'static str; fn set_module_name(&mut self, name: &str); fn set_is_dumping(&mut self, yes: bool); fn set_debug_assertions(&mut self, yes: bool); fn opt_level(&self) -> OptimizationLevel; fn set_opt_level(&mut self, level: OptimizationLevel); fn dump_ir(&mut self, path: &Path) -> Result<()>; fn dump_disasm(&mut self, path: &Path) -> Result<()>; fn is_aot(&self) -> bool; fn function_name_is_unique(&self, name: &str) -> bool; fn build_function( &mut self, name: &str, ret: Option<Self::Type>, params: &[Self::Type], param_names: &[&str], linkage: Linkage, ) -> Result<(Self::Builder<'_>, Self::FuncId)>; fn verify_module(&mut self) -> Result<()>; fn optimize_module(&mut self) -> Result<()>; fn write_object<W: Write>(&mut self, w: W) -> Result<()>; fn jit_function(&mut self, id: Self::FuncId) -> Result<usize>; unsafe fn free_function(&mut self, id: Self::FuncId) -> Result<()>; unsafe fn free_all_functions(&mut self) -> Result<()>;
}

Required Associated Types§

Source

type Builder<'a>: Builder<Type = Self::Type, Value = Self::Value, StackSlot = Self::StackSlot, BasicBlock = Self::BasicBlock, Function = Self::Function> where Self: 'a

Source

type FuncId: Copy + Eq + Hash + Debug

Required Methods§

Source

fn ir_extension(&self) -> &'static str

Source

fn set_module_name(&mut self, name: &str)

Source

fn set_is_dumping(&mut self, yes: bool)

Source

fn set_debug_assertions(&mut self, yes: bool)

Source

fn opt_level(&self) -> OptimizationLevel

Source

fn set_opt_level(&mut self, level: OptimizationLevel)

Source

fn dump_ir(&mut self, path: &Path) -> Result<()>

Source

fn dump_disasm(&mut self, path: &Path) -> Result<()>

Source

fn is_aot(&self) -> bool

Source

fn function_name_is_unique(&self, name: &str) -> bool

Source

fn build_function( &mut self, name: &str, ret: Option<Self::Type>, params: &[Self::Type], param_names: &[&str], linkage: Linkage, ) -> Result<(Self::Builder<'_>, Self::FuncId)>

Source

fn verify_module(&mut self) -> Result<()>

Source

fn optimize_module(&mut self) -> Result<()>

Source

fn write_object<W: Write>(&mut self, w: W) -> Result<()>

Source

fn jit_function(&mut self, id: Self::FuncId) -> Result<usize>

Source

unsafe fn free_function(&mut self, id: Self::FuncId) -> Result<()>

Source

unsafe fn free_all_functions(&mut self) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl Backend for EvmCraneliftBackend

impl<'ctx> Backend for EvmLlvmBackend<'ctx>