Struct zingen::Dispatcher
source · pub struct Dispatcher {
pub abi: Vec<Abi>,
pub asm: MacroAssembler,
pub env: Env,
pub funcs: BTreeMap<u32, FuncType>,
pub table: JumpTable,
}
Expand description
Code generator for EVM dispatcher.
Fields§
§abi: Vec<Abi>
ABI for the current function
asm: MacroAssembler
Code buffer
env: Env
WASM environment
funcs: BTreeMap<u32, FuncType>
Module functions
table: JumpTable
Jump table
Implementations§
source§impl Dispatcher
impl Dispatcher
sourcepub fn finish(
&mut self,
selectors: Functions<'_>,
table: &mut JumpTable
) -> Result<Vec<u8>>
pub fn finish( &mut self, selectors: Functions<'_>, table: &mut JumpTable ) -> Result<Vec<u8>>
Emit compiled code to the given buffer.
sourcefn query_func(&self, name: &str) -> Result<u32>
fn query_func(&self, name: &str) -> Result<u32>
Query exported function from selector.
sourcefn ext_return(&mut self, sig: &FuncType) -> Result<()>
fn ext_return(&mut self, sig: &FuncType) -> Result<()>
Emit return of ext function.
fn process(&mut self, len: usize, last: bool) -> Result<bool>
Auto Trait Implementations§
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnwindSafe for Dispatcher
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