Compute the jump target for FOR_ITER exhaustion: skip END_FOR and jump to POP_ITER.
(&self, target: bytecode::Label)
| 6963 | |
| 6964 | /// Compute the jump target for FOR_ITER exhaustion: skip END_FOR and jump to POP_ITER. |
| 6965 | fn for_iter_jump_target(&self, target: bytecode::Label) -> bytecode::Label { |
| 6966 | let target_idx = target.as_usize(); |
| 6967 | if let Some(unit) = self.code.instructions.get(target_idx) |
| 6968 | && matches!( |
| 6969 | unit.op, |
| 6970 | bytecode::Instruction::EndFor | bytecode::Instruction::InstrumentedEndFor |
| 6971 | ) |
| 6972 | { |
| 6973 | return bytecode::Label::from_u32(target.as_u32() + 1); |
| 6974 | } |
| 6975 | target |
| 6976 | } |
| 6977 | fn execute_make_function(&mut self, vm: &VirtualMachine) -> FrameResult { |
| 6978 | // MakeFunction only takes code object, no flags |
| 6979 | let code_obj: PyRef<PyCode> = self |
no test coverage detected