sway_core::asm_generation::asm_builder

Trait AsmBuilder

Source
pub trait AsmBuilder {
    // Required methods
    fn func_to_labels(&mut self, func: &Function) -> (Label, Label);
    fn compile_configurable(&mut self, config: &ConfigContent);
    fn compile_function(
        &mut self,
        handler: &Handler,
        function: Function,
    ) -> Result<(), ErrorEmitted>;
    fn finalize(
        self,
        handler: &Handler,
        build_config: Option<&BuildConfig>,
        fallback_fn: Option<Label>,
    ) -> Result<FinalizedAsm, ErrorEmitted>;
}

Required Methods§

Source

fn func_to_labels(&mut self, func: &Function) -> (Label, Label)

Source

fn compile_configurable(&mut self, config: &ConfigContent)

Source

fn compile_function( &mut self, handler: &Handler, function: Function, ) -> Result<(), ErrorEmitted>

Source

fn finalize( self, handler: &Handler, build_config: Option<&BuildConfig>, fallback_fn: Option<Label>, ) -> Result<FinalizedAsm, ErrorEmitted>

Implementors§

Source§

impl<'ir, 'eng> AsmBuilder for EvmAsmBuilder<'ir, 'eng>