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

Method read_slot_from_fp

crates/unwinder/src/stackwalk.rs:93–97  ·  view source on GitHub ↗

Read out a machine-word-sized value at the given offset from FP in this frame. # Safety Requires that this frame is a valid, active frame. A `Frame` provided by `visit_frames()` will be valid for the duration of the invoked closure. Requires that `offset` falls within the size of this frame. This ordinarily requires knowledge passed from the compiler that produced the running function, e.g., Cr

(&self, offset: isize)

Source from the content-addressed store, hash-verified

91 /// frame. This ordinarily requires knowledge passed from the
92 /// compiler that produced the running function, e.g., Cranelift.
93 pub unsafe fn read_slot_from_fp(&self, offset: isize) -> usize {
94 // SAFETY: we required that this is a valid frame, and that
95 // `offset` is a valid offset within that frame.
96 unsafe { *(self.fp.wrapping_add_signed(offset) as *mut usize) }
97 }
98}
99
100/// A cursor over `Frame`s in a single activation of Wasm.

Callers 1

compute_handlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected