| 78 | /// Check if instruction uses co_names |
| 79 | #[must_use] |
| 80 | pub fn has_name(opcode: i32) -> bool { |
| 81 | matches!( |
| 82 | Self::try_from(opcode).map(|op| op.inner()), |
| 83 | Ok(AnyInstruction::Real( |
| 84 | Instruction::DeleteAttr { .. } |
| 85 | | Instruction::DeleteGlobal { .. } |
| 86 | | Instruction::DeleteName { .. } |
| 87 | | Instruction::ImportFrom { .. } |
| 88 | | Instruction::ImportName { .. } |
| 89 | | Instruction::LoadAttr { .. } |
| 90 | | Instruction::LoadGlobal { .. } |
| 91 | | Instruction::LoadName { .. } |
| 92 | | Instruction::StoreAttr { .. } |
| 93 | | Instruction::StoreGlobal { .. } |
| 94 | | Instruction::StoreName { .. } |
| 95 | )) |
| 96 | ) |
| 97 | } |
| 98 | |
| 99 | /// Check if instruction is a jump |
| 100 | #[must_use] |