run_const

Function run_const 

Source
pub(crate) fn run_const<T: Config>(
    wasm: &mut WasmReader<'_>,
    stack: &mut Stack,
    module: ModuleAddr,
    store: &Store<'_, T>,
) -> Result<(), RuntimeError>
Expand description

Execute a previosly-validated constant expression. These type of expressions are used for initializing global variables, data and element segments.

§Arguments

TODO

§Safety

This function assumes that the expression has been validated. Passing unvalidated code will likely result in a panic, or undefined behaviour.