@@ -15,7 +15,7 @@ use crate::{
1515/// A Single bytecode instruction.
1616/// Instructions are ordered to match CPython 3.13 opcode numbers exactly.
1717/// HAVE_ARGUMENT = 44: opcodes 0-43 have no argument, 44+ have arguments.
18- #[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
18+ #[ derive( Clone , Copy , Debug ) ]
1919#[ repr( u8 ) ]
2020pub enum RealInstruction {
2121 // ==================== No-argument instructions (opcode < 44) ====================
@@ -784,7 +784,7 @@ impl InstructionMetadata for RealInstruction {
784784 }
785785}
786786
787- #[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
787+ #[ derive( Clone , Copy , Debug ) ]
788788#[ repr( u16 ) ]
789789pub enum PseudoInstruction {
790790 Jump {
@@ -816,6 +816,8 @@ pub enum PseudoInstruction {
816816 StoreFastMaybeNull = 267 , // Placeholder
817817}
818818
819+ const _: ( ) = assert ! ( mem:: size_of:: <PseudoInstruction >( ) == 2 ) ;
820+
819821impl From < PseudoInstruction > for u16 {
820822 #[ inline]
821823 fn from ( ins : PseudoInstruction ) -> Self {
@@ -884,9 +886,8 @@ impl InstructionMetadata for PseudoInstruction {
884886 }
885887}
886888
887- const _: ( ) = assert ! ( mem:: size_of:: <PseudoInstruction >( ) == 2 ) ;
888-
889- #[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
889+ #[ derive( Clone , Copy , Debug ) ]
890+ #[ repr( u16 ) ]
890891pub enum Instruction {
891892 Real ( RealInstruction ) ,
892893 Pseudo ( PseudoInstruction ) ,
0 commit comments