@@ -391,7 +391,7 @@ impl ExecutingFrame<'_> {
391391 // Instruction::Reraise are reraise operations that should not add
392392 // new traceback entries
393393 let is_reraise = match op {
394- bytecode:: Instruction :: Raise { kind } => matches ! (
394+ bytecode:: Instruction :: RaiseVarArgs { kind } => matches ! (
395395 kind. get( arg) ,
396396 bytecode:: RaiseKind :: BareRaise | bytecode:: RaiseKind :: ReraiseFromStack
397397 ) ,
@@ -610,7 +610,7 @@ impl ExecutingFrame<'_> {
610610 Ok ( None )
611611 }
612612 bytecode:: Instruction :: BinaryOp { op } => self . execute_bin_op ( vm, op. get ( arg) ) ,
613- bytecode:: Instruction :: BinarySubscript => {
613+ bytecode:: Instruction :: BinarySubscr => {
614614 let key = self . pop_value ( ) ;
615615 let container = self . pop_value ( ) ;
616616 self . state
@@ -711,11 +711,11 @@ impl ExecutingFrame<'_> {
711711 let args = self . collect_ex_args ( vm, has_kwargs. get ( arg) ) ?;
712712 self . execute_call ( args, vm)
713713 }
714- bytecode:: Instruction :: CallFunctionKeyword { nargs } => {
714+ bytecode:: Instruction :: CallKw { nargs } => {
715715 let args = self . collect_keyword_args ( nargs. get ( arg) ) ;
716716 self . execute_call ( args, vm)
717717 }
718- bytecode:: Instruction :: CallFunctionPositional { nargs } => {
718+ bytecode:: Instruction :: Call { nargs } => {
719719 let args = self . collect_positional_args ( nargs. get ( arg) ) ;
720720 self . execute_call ( args, vm)
721721 }
@@ -753,7 +753,7 @@ impl ExecutingFrame<'_> {
753753 self . push_value ( matched) ;
754754 Ok ( None )
755755 }
756- bytecode:: Instruction :: CompareOperation { op } => self . execute_compare ( vm, op. get ( arg) ) ,
756+ bytecode:: Instruction :: CompareOp { op } => self . execute_compare ( vm, op. get ( arg) ) ,
757757 bytecode:: Instruction :: ContainsOp ( invert) => {
758758 let b = self . pop_value ( ) ;
759759 let a = self . pop_value ( ) ;
@@ -822,7 +822,7 @@ impl ExecutingFrame<'_> {
822822 }
823823 Ok ( None )
824824 }
825- bytecode:: Instruction :: DeleteLocal ( idx) => {
825+ bytecode:: Instruction :: DeleteName ( idx) => {
826826 let name = self . code . names [ idx. get ( arg) as usize ] ;
827827 let res = self . locals . mapping ( ) . ass_subscript ( name, None , vm) ;
828828
@@ -835,7 +835,7 @@ impl ExecutingFrame<'_> {
835835 }
836836 Ok ( None )
837837 }
838- bytecode:: Instruction :: DeleteSubscript => self . execute_delete_subscript ( vm) ,
838+ bytecode:: Instruction :: DeleteSubscr => self . execute_delete_subscript ( vm) ,
839839 bytecode:: Instruction :: DictUpdate { index } => {
840840 // Stack before: [..., dict, ..., source] (source at TOS)
841841 // Stack after: [..., dict, ...] (source consumed)
@@ -1192,7 +1192,7 @@ impl ExecutingFrame<'_> {
11921192 self . push_value ( func) ;
11931193 Ok ( None )
11941194 }
1195- bytecode:: Instruction :: LoadNameAny ( idx) => {
1195+ bytecode:: Instruction :: LoadName ( idx) => {
11961196 let name = self . code . names [ idx. get ( arg) as usize ] ;
11971197 let result = self . locals . mapping ( ) . subscript ( name, vm) ;
11981198 match result {
@@ -1428,7 +1428,7 @@ impl ExecutingFrame<'_> {
14281428 bytecode:: Instruction :: Nop => Ok ( None ) ,
14291429 // PopBlock is now a pseudo-instruction - exception table handles this
14301430 bytecode:: Instruction :: PopBlock => Ok ( None ) ,
1431- bytecode:: Instruction :: PopException => {
1431+ bytecode:: Instruction :: PopExcept => {
14321432 // Pop prev_exc from value stack and restore it
14331433 let prev_exc = self . pop_value ( ) ;
14341434 if vm. is_none ( & prev_exc) {
@@ -1457,7 +1457,7 @@ impl ExecutingFrame<'_> {
14571457 self . pop_value ( ) ;
14581458 Ok ( None )
14591459 }
1460- bytecode:: Instruction :: Raise { kind } => self . execute_raise ( vm, kind. get ( arg) ) ,
1460+ bytecode:: Instruction :: RaiseVarArgs { kind } => self . execute_raise ( vm, kind. get ( arg) ) ,
14611461 bytecode:: Instruction :: Resume { arg : resume_arg } => {
14621462 // Resume execution after yield, await, or at function start
14631463 // In CPython, this checks instrumentation and eval breaker
@@ -1559,7 +1559,7 @@ impl ExecutingFrame<'_> {
15591559 bytecode:: Instruction :: SetFunctionAttribute { attr } => {
15601560 self . execute_set_function_attribute ( vm, attr. get ( arg) )
15611561 }
1562- bytecode:: Instruction :: SetupAnnotation => self . setup_annotations ( vm) ,
1562+ bytecode:: Instruction :: SetupAnnotations => self . setup_annotations ( vm) ,
15631563 bytecode:: Instruction :: BeforeWith => {
15641564 // TOS: context_manager
15651565 // Result: [..., __exit__, __enter__ result]
@@ -1621,13 +1621,13 @@ impl ExecutingFrame<'_> {
16211621 . set_item ( self . code . names [ idx. get ( arg) as usize ] , value, vm) ?;
16221622 Ok ( None )
16231623 }
1624- bytecode:: Instruction :: StoreLocal ( idx) => {
1624+ bytecode:: Instruction :: StoreName ( idx) => {
16251625 let name = self . code . names [ idx. get ( arg) as usize ] ;
16261626 let value = self . pop_value ( ) ;
16271627 self . locals . mapping ( ) . ass_subscript ( name, Some ( value) , vm) ?;
16281628 Ok ( None )
16291629 }
1630- bytecode:: Instruction :: StoreSubscript => self . execute_store_subscript ( vm) ,
1630+ bytecode:: Instruction :: StoreSubscr => self . execute_store_subscript ( vm) ,
16311631 bytecode:: Instruction :: Subscript => self . execute_subscript ( vm) ,
16321632 bytecode:: Instruction :: Swap { index } => {
16331633 let len = self . state . stack . len ( ) ;
@@ -1779,6 +1779,9 @@ impl ExecutingFrame<'_> {
17791779 self . push_value ( vm. ctx . new_bool ( !value) . into ( ) ) ;
17801780 Ok ( None )
17811781 }
1782+ bytecode:: Instruction :: Reserved => {
1783+ unreachable ! ( "{instruction:?} instruction should not be executed" )
1784+ }
17821785 }
17831786 }
17841787
0 commit comments