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

Method frame_data

crates/wasmtime/src/runtime/debug.rs:489–499  ·  view source on GitHub ↗
(&self, store: &'a mut StoreOpaque)

Source from the content-addressed store, hash-verified

487 }
488
489 fn frame_data<'a>(&self, store: &'a mut StoreOpaque) -> Result<&'a FrameData> {
490 if !self.is_valid_impl(store) {
491 crate::error::bail!("Frame handle is no longer valid.");
492 }
493 let (cache, registry) = store.frame_data_cache_mut_and_registry();
494 let frames = cache.lookup_or_compute(registry, self.cursor.frame());
495 // `virtual_frame_idx` counts up for ease of iteration
496 // behavior, while the frames are stored in outer-to-inner
497 // (i.e., caller to callee) order, so we need to reverse here.
498 Ok(&frames[frames.len() - 1 - self.virtual_frame_idx])
499 }
500
501 fn raw_instance<'a>(&self, store: &mut StoreOpaque) -> Result<&'a crate::vm::Instance> {
502 let frame_data = self.frame_data(store)?;

Callers 6

raw_instanceMethod · 0.80
num_localsMethod · 0.80
num_stacksMethod · 0.80
localMethod · 0.80
stackMethod · 0.80

Calls 6

OkFunction · 0.85
is_valid_implMethod · 0.80
lookup_or_computeMethod · 0.80
frameMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected