Skip to main content

Frame

Struct Frame 

Source
struct Frame<'a> {
    store: &'a mut Store,
    host: &'a mut dyn Host,
    module: &'a Rc<Module>,
    inst: usize,
    code: &'a [u8],
    blocks: &'a BTreeMap<usize, (Option<usize>, usize)>,
    locals: Vec<Val>,
    depth: usize,
}

Fields§

§store: &'a mut Store§host: &'a mut dyn Host§module: &'a Rc<Module>§inst: usize§code: &'a [u8]§blocks: &'a BTreeMap<usize, (Option<usize>, usize)>§locals: Vec<Val>§depth: usize

Implementations§

Source§

impl<'a> Frame<'a>

Source

fn mem(&self) -> Result<Rc<RefCell<Vec<u8>>>, Trap>

Source

fn block_arity(&self, pc: &mut usize) -> Result<(usize, usize), Trap>

Source

fn run(self, nresults: usize) -> Result<Vec<Val>, Trap>

Source

fn branch( &mut self, st: &mut Vec<Val>, labels: &mut Vec<Label>, n: usize, pc: &mut usize, ) -> bool

br n。関数の外まで抜けたら true。

Source

fn do_call(&mut self, st: &mut Vec<Val>, addr: u32) -> Result<(), Trap>

Source

fn range(&self, ea: u64, n: usize, len: usize) -> Result<usize, Trap>

Source

fn load(&self, op: u8, ea: u64) -> Result<Val, Trap>

Source

fn store_mem(&self, op: u8, ea: u64, v: Val) -> Result<(), Trap>

Source

fn misc( &mut self, sub: u32, st: &mut Vec<Val>, pc: &mut usize, ) -> Result<(), Trap>

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Frame<'a>

§

impl<'a> !Send for Frame<'a>

§

impl<'a> !Sync for Frame<'a>

§

impl<'a> !UnwindSafe for Frame<'a>

§

impl<'a> Freeze for Frame<'a>

§

impl<'a> Unpin for Frame<'a>

§

impl<'a> UnsafeUnpin for Frame<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.