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

Method stack_last

crates/vm/src/frame.rs:363–369  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

361 /// Get the last stack element (top of stack).
362 #[inline(always)]
363 fn stack_last(&self) -> Option<&Option<PyStackRef>> {
364 if self.stack_top == 0 {
365 None
366 } else {
367 Some(self.stack_index(self.stack_top as usize - 1))
368 }
369 }
370
371 /// Get mutable reference to the last stack element.
372 #[inline(always)]

Callers 1

top_valueMethod · 0.80

Calls 2

stack_indexMethod · 0.80
SomeClass · 0.50

Tested by

no test coverage detected