MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / eval_ref_const

Method eval_ref_const

crates/tinywasm/src/store/mod.rs:666–677  ·  view source on GitHub ↗
(
        &self,
        const_instrs: &[tinywasm_types::ConstInstruction],
        module_global_addrs: &[Addr],
        module_func_addrs: &[FuncAddr],
    )

Source from the content-addressed store, hash-verified

664 }
665
666 fn eval_ref_const(
667 &self,
668 const_instrs: &[tinywasm_types::ConstInstruction],
669 module_global_addrs: &[Addr],
670 module_func_addrs: &[FuncAddr],
671 ) -> Result<Option<u32>> {
672 let value = self.eval_const(const_instrs, module_global_addrs, module_func_addrs)?;
673 match value {
674 TinyWasmValue::ValueRef(v) => Ok(v.addr()),
675 other => Err(Error::Other(format!("expected reference const value, got {other:?}"))),
676 }
677 }
678}

Callers 1

elem_addrMethod · 0.80

Calls 2

eval_constMethod · 0.80
addrMethod · 0.45

Tested by

no test coverage detected