Handle iterator exhaustion in specialized FOR_ITER handlers. Skips END_FOR if present at target and jumps.
(&mut self, target: bytecode::Label)
| 8945 | /// Handle iterator exhaustion in specialized FOR_ITER handlers. |
| 8946 | /// Skips END_FOR if present at target and jumps. |
| 8947 | fn for_iter_jump_on_exhausted(&mut self, target: bytecode::Label) { |
| 8948 | let target_idx = target.as_usize(); |
| 8949 | let jump_target = if let Some(unit) = self.code.instructions.get(target_idx) { |
| 8950 | if matches!( |
| 8951 | unit.op, |
| 8952 | bytecode::Instruction::EndFor | bytecode::Instruction::InstrumentedEndFor |
| 8953 | ) { |
| 8954 | bytecode::Label::from_u32(target.as_u32() + 1) |
| 8955 | } else { |
| 8956 | target |
| 8957 | } |
| 8958 | } else { |
| 8959 | target |
| 8960 | }; |
| 8961 | self.jump(jump_target); |
| 8962 | } |
| 8963 | |
| 8964 | fn specialize_load_global( |
| 8965 | &mut self, |
no test coverage detected