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

Method push

pulley/src/interp.rs:1050–1057  ·  view source on GitHub ↗
(&mut self, val: T)

Source from the content-addressed store, hash-verified

1048 /// is generated.
1049 #[must_use]
1050 fn push<I: Encode, T>(&mut self, val: T) -> ControlFlow<Done> {
1051 let new_sp = self.state[XReg::sp].get_ptr::<T>().wrapping_sub(1);
1052 self.set_sp::<I>(new_sp.cast())?;
1053 unsafe {
1054 new_sp.write_unaligned(val);
1055 }
1056 ControlFlow::Continue(())
1057 }
1058
1059 /// `ret = *sp; sp -= size_of::<T>()`
1060 fn pop<T>(&mut self) -> T {

Callers 2

after_visitMethod · 0.45
decode_allMethod · 0.45

Calls 1

castMethod · 0.45

Tested by

no test coverage detected