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

Method next

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

Source from the content-addressed store, hash-verified

440 type Item = Option<PyStackRef>;
441
442 fn next(&mut self) -> Option<Self::Item> {
443 if self.current >= self.end {
444 return None;
445 }
446 let idx = self.localsplus.nlocalsplus as usize + self.current;
447 let data = self.localsplus.data_as_mut_slice();
448 let raw = core::mem::replace(&mut data[idx], 0);
449 self.current += 1;
450 Some(unsafe { core::mem::transmute::<usize, Option<PyStackRef>>(raw) })
451 }
452
453 fn size_hint(&self) -> (usize, Option<usize>) {
454 let remaining = self.end - self.current;

Callers 5

execute_instructionMethod · 0.45
iterate_mapping_keysMethod · 0.45
_sendMethod · 0.45
execute_for_iterMethod · 0.45
unpack_sequenceMethod · 0.45

Calls 3

data_as_mut_sliceMethod · 0.80
replaceFunction · 0.50
SomeClass · 0.50

Tested by

no test coverage detected