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

Method offset

pulley/src/decode.rs:220–222  ·  view source on GitHub ↗

Get a new `UnsafeBytecodeStream` pointing at the bytecode that is at the given relative offset from this stream's current position. # Safety Same as the `new` constructor. May only be used when it is guaranteed that the address at `self._as_ptr() + offset` contains valid Pulley bytecode.

(&self, offset: isize)

Source from the content-addressed store, hash-verified

218 /// that the address at `self._as_ptr() + offset` contains valid Pulley
219 /// bytecode.
220 pub unsafe fn offset(&self, offset: isize) -> Self {
221 UnsafeBytecodeStream(unsafe { NonNull::new_unchecked(self.0.as_ptr().offset(offset)) })
222 }
223
224 /// Get this stream's underlying raw pointer.
225 pub fn as_ptr(&self) -> NonNull<u8> {

Callers 6

pc_relMethod · 0.45
current_pcMethod · 0.45
simple_push_popFunction · 0.45
br_table32Method · 0.45
guards_presentFunction · 0.45
assert_guardsFunction · 0.45

Calls 2

as_ptrMethod · 0.45

Tested by 1

simple_push_popFunction · 0.36