Struct CallFrame

Source
pub(crate) struct CallFrame {
    pub return_func_addr: FuncAddr,
    pub return_addr: usize,
    pub value_stack_base_idx: usize,
    pub call_frame_base_idx: usize,
    pub return_value_count: usize,
    pub return_stp: usize,
}
Expand description

The WASM spec calls this Activations, however it refers to the call frames of functions.

Fields§

§return_func_addr: FuncAddr

Store address of the function that called this CallFrame’s function

§return_addr: usize

Value that the PC has to be set to when this function returns

§value_stack_base_idx: usize

The index to the lowermost value in Stack::values belonging to this CallFrame’s stack

Values below this may still belong to this CallFrame, but they are locals. Consequently, this is the lowest index down to which the stack may be popped in this CallFrame. However, clearing up this CallFrame may require further popping, down to (and including!) the index stored in Self::call_frame_base_idx.

§call_frame_base_idx: usize

The index to the lowermost value on Stack::values that belongs to this CallFrame

Clearing this CallFrame requires popping all elements on Stack::values down to (and including!) this index.

§return_value_count: usize

Number of return values to retain on Stack::values when unwinding/popping a CallFrame

§return_stp: usize

Trait Implementations§

Source§

impl Debug for CallFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.