pub(crate) struct CallFrame {
pub return_func_addr: MaybeUninit<FuncAddr>,
pub return_addr: MaybeUninit<usize>,
pub value_stack_base_idx: usize,
pub call_frame_base_idx: usize,
pub return_value_count: usize,
pub return_stp: MaybeUninit<usize>,
}Expand description
The WASM spec calls this Activations, however it refers to the call frames of functions.
Fields§
§return_func_addr: MaybeUninit<FuncAddr>Store address of the function that called this CallFrame’s function
This is always uninitialized for the base call frame and initialized for all other call frames.
return_addr: MaybeUninit<usize>Value that the PC has to be set to when this function returns
This is always uninitialized for the base call frame and initialized for all other call frames.
value_stack_base_idx: usizeThe 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: usizeThe 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: usizeNumber of return values to retain on Stack::values when unwinding/popping a CallFrame
return_stp: MaybeUninit<usize>Value that the stp has to be set to when this function returns
This is always uninitialized for the base call frame and initialized for all other call frames.