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

Method current_pc

pulley/src/interp.rs:1041–1043  ·  view source on GitHub ↗

Returns the PC of the current instruction where `I` is the static type representing the current instruction.

(&self)

Source from the content-addressed store, hash-verified

1039 /// Returns the PC of the current instruction where `I` is the static type
1040 /// representing the current instruction.
1041 fn current_pc<I: Encode>(&self) -> NonNull<u8> {
1042 unsafe { self.pc.offset(-isize::from(I::WIDTH)).as_ptr() }
1043 }
1044
1045 /// `sp -= size_of::<T>(); *sp = val;`
1046 ///

Callers

nothing calls this directly

Calls 3

fromFunction · 0.85
as_ptrMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected