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

Method get

crates/environ/src/stack_map.rs:45–57  ·  view source on GitHub ↗

Returns the stack map corresponding to the `i`th pc.

(&self, i: usize)

Source from the content-addressed store, hash-verified

43
44 /// Returns the stack map corresponding to the `i`th pc.
45 fn get(&self, i: usize) -> Option<StackMap<'a>> {
46 let pointer_to_stack_map = self.pointers_to_stack_map[i].get(LittleEndian) as usize;
47 let data = self.stack_map_data.get(pointer_to_stack_map..)?;
48
49 let (frame_size, data) = data.split_first()?;
50 let (count, data) = data.split_first()?;
51 let data = data.get(..count.get(LittleEndian) as usize)?;
52
53 Some(StackMap {
54 frame_size: frame_size.get(LittleEndian),
55 data,
56 })
57 }
58}
59
60/// A map for determining where live GC references live in a stack frame.

Callers 4

parseMethod · 0.45
lookupMethod · 0.45
into_iterMethod · 0.45
offsetsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected