Function run_const

Source
pub(crate) fn run_const(
    wasm: &mut WasmReader<'_>,
    stack: &mut Stack,
    module: &ModuleInst<'_>,
    store: &Store<'_>,
) -> 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.