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

Method for_iter_has_end_for_shape

crates/vm/src/frame.rs:8929–8943  ·  view source on GitHub ↗
(&self, instr_idx: usize, jump_delta: u32)

Source from the content-addressed store, hash-verified

8927
8928 #[inline]
8929 fn for_iter_has_end_for_shape(&self, instr_idx: usize, jump_delta: u32) -> bool {
8930 let target_idx = instr_idx
8931 + 1
8932 + Instruction::ForIter {
8933 delta: Arg::marker(),
8934 }
8935 .cache_entries()
8936 + jump_delta as usize;
8937 self.code.instructions.get(target_idx).is_some_and(|unit| {
8938 matches!(
8939 unit.op,
8940 Instruction::EndFor | Instruction::InstrumentedEndFor
8941 )
8942 })
8943 }
8944
8945 /// Handle iterator exhaustion in specialized FOR_ITER handlers.
8946 /// Skips END_FOR if present at target and jumps.

Callers 1

specialize_for_iterMethod · 0.80

Calls 2

cache_entriesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected