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

Method set_sp

pulley/src/interp.rs:1076–1084  ·  view source on GitHub ↗
(&mut self, sp: *mut u8)

Source from the content-addressed store, hash-verified

1074 /// instruction traps.
1075 #[must_use]
1076 fn set_sp<I: Encode>(&mut self, sp: *mut u8) -> ControlFlow<Done> {
1077 let sp_raw = sp as usize;
1078 let base_raw = self.state.stack.base() as usize;
1079 if sp_raw < base_raw {
1080 return self.done_trap_kind::<I>(Some(TrapKind::StackOverflow));
1081 }
1082 self.set_sp_unchecked(sp);
1083 ControlFlow::Continue(())
1084 }
1085
1086 /// Same as `set_sp` but does not check to see if `sp` is in-bounds. Should
1087 /// only be used with stack increment operations such as `pop`.

Callers

nothing calls this directly

Calls 2

set_sp_uncheckedMethod · 0.80
baseMethod · 0.45

Tested by

no test coverage detected