(
state: &mut FrameState,
value: FrameValue,
context: &str,
instruction_index: usize,
)
| 1033 | .skip(1) |
| 1034 | .chain(std::iter::once(instructions.len())) |
| 1035 | .collect::<Vec<_>>(); |
| 1036 | let mut block_by_instruction = vec![0usize; instructions.len()]; |
| 1037 | for (block, (&start, &end)) in block_starts.iter().zip(&block_ends).enumerate() { |
| 1038 | block_by_instruction[start..end].fill(block); |
| 1039 | } |
| 1040 | (block_starts, block_ends, block_by_instruction) |
| 1041 | } |
| 1042 | |
| 1043 | fn instruction_ends_block(instruction: &Instruction) -> bool { |
| 1044 | use Instruction as I; |
| 1045 | matches!( |
| 1046 | instruction, |
| 1047 | I::Ifeq(_) |
| 1048 | | I::Ifne(_) |
no test coverage detected