MCPcopy Index your code
hub / github.com/RustPython/RustPython / stack_pop

Method stack_pop

crates/vm/src/frame.rs:325–332  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

323 /// Pop a value from the evaluation stack.
324 #[inline(always)]
325 fn stack_pop(&mut self) -> Option<PyStackRef> {
326 debug_assert!(self.stack_top > 0, "stack underflow");
327 self.stack_top -= 1;
328 let idx = self.nlocalsplus as usize + self.stack_top as usize;
329 let data = self.data_as_mut_slice();
330 let raw = core::mem::replace(&mut data[idx], 0);
331 unsafe { core::mem::transmute::<usize, Option<PyStackRef>>(raw) }
332 }
333
334 /// Immutable view of the active stack as `Option<PyStackRef>` slice.
335 #[inline(always)]

Callers 4

stack_truncateMethod · 0.80
stack_clearMethod · 0.80
unwind_blocksMethod · 0.80
pop_stackref_optMethod · 0.80

Calls 2

data_as_mut_sliceMethod · 0.80
replaceFunction · 0.50

Tested by

no test coverage detected