run_const

Function run_const 

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

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

§Arguments

TODO

§Safety

  1. the constant expression in the reader must be valid
  2. the module address must be valid in the given store