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

Method local

crates/environ/src/frame_table.rs:572–576  ·  view source on GitHub ↗

Get the type and offset for a given local.

(&self, index: usize)

Source from the content-addressed store, hash-verified

570
571 /// Get the type and offset for a given local.
572 pub fn local(&self, index: usize) -> Option<(FrameStateSlotOffset, FrameValType)> {
573 let offset = FrameStateSlotOffset(self.local_offsets.get(index)?.get(LittleEndian));
574 let ty = FrameValType::try_from(*self.local_types.get(index)?).expect("Invalid type");
575 Some((offset, ty))
576 }
577
578 /// Get the number of locals in the frame.
579 pub fn num_locals(&self) -> usize {

Callers 2

frame_localsMethod · 0.45
localsMethod · 0.45

Calls 3

getMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected