MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / num_locals

Method num_locals

crates/wasmtime/src/runtime/debug.rs:566–570  ·  view source on GitHub ↗

Get the number of locals in this frame.

(&self, mut store: impl AsContextMut)

Source from the content-addressed store, hash-verified

564
565 /// Get the number of locals in this frame.
566 pub fn num_locals(&self, mut store: impl AsContextMut) -> Result<u32> {
567 let store = store.as_context_mut();
568 let frame_data = self.frame_data(store.0.as_store_opaque())?;
569 Ok(u32::try_from(frame_data.locals.len()).unwrap())
570 }
571
572 /// Get the depth of the operand stack in this frame.
573 pub fn num_stacks(&self, mut store: impl AsContextMut) -> Result<u32> {

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
frame_dataMethod · 0.80
as_store_opaqueMethod · 0.80
as_context_mutMethod · 0.45
unwrapMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected