MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / push

Method push

crates/tinywasm/src/interpreter/stack/value_stack.rs:39–47  ·  view source on GitHub ↗
(&mut self, value: T)

Source from the content-addressed store, hash-verified

37
38 #[inline(always)]
39 pub(crate) fn push(&mut self, value: T) -> Result<(), Trap> {
40 if !self.ensure_capacity_for(self.data.len() + 1) {
41 cold_path();
42 return Err(Trap::ValueStackOverflow);
43 }
44
45 self.data.push(value);
46 Ok(())
47 }
48
49 #[inline(always)]
50 pub(crate) fn pop(&mut self) -> T {

Callers 3

truncate_to_one_tailMethod · 0.45
push_dynMethod · 0.45

Calls 2

ensure_capacity_forMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected