(opcode: i32)
| 99 | /// Check if instruction is a jump |
| 100 | #[must_use] |
| 101 | pub fn has_jump(opcode: i32) -> bool { |
| 102 | matches!( |
| 103 | Self::try_from(opcode).map(|op| op.inner()), |
| 104 | Ok(AnyInstruction::Real( |
| 105 | Instruction::ForIter { .. } |
| 106 | | Instruction::PopJumpIfFalse { .. } |
| 107 | | Instruction::PopJumpIfTrue { .. } |
| 108 | | Instruction::Send { .. } |
| 109 | ) | AnyInstruction::Pseudo(PseudoInstruction::Jump { .. })) |
| 110 | ) |
| 111 | } |
| 112 | |
| 113 | /// Check if instruction uses co_freevars/co_cellvars |
| 114 | #[must_use] |