MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / pop_n

Method pop_n

compiler/src/modules/vm/helpers.rs:56–59  ·  view source on GitHub ↗
(&mut self, n: usize)

Source from the content-addressed store, hash-verified

54 let b = self.pop()?; let a = self.pop()?; Ok((a, b))
55 }
56 #[inline] pub(crate) fn pop_n(&mut self, n: usize) -> Result<Vec<Val>, VmErr> {
57 let at = self.stack.len().checked_sub(n).ok_or(cold_runtime("stack underflow"))?;
58 Ok(self.stack.split_off(at))
59 }
60
61 /* Materialise an iterable into Vec<Val> for `*args` positional spread. */
62 pub(crate) fn iter_to_vec_for_spread(&mut self, v: Val) -> Result<Vec<Val>, VmErr> {

Callers 15

exec_make_classMethod · 0.80
exec_build_moduleMethod · 0.80
handle_buildMethod · 0.80
exec_make_functionMethod · 0.80
call_externMethod · 0.80
build_setMethod · 0.80
call_dictMethod · 0.80
call_frozensetMethod · 0.80
call_bytesMethod · 0.80
call_propertyMethod · 0.80
call_staticmethodMethod · 0.80
call_roundMethod · 0.80

Calls 2

cold_runtimeFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected