@@ -272,19 +272,11 @@ pub enum Instruction {
272272 Continue {
273273 target : Arg < Label > ,
274274 } = 217 ,
275- JumpIfFalseOrPop {
276- target : Arg < Label > ,
277- } = 218 ,
278- JumpIfTrueOrPop {
279- target : Arg < Label > ,
280- } = 219 ,
281275 JumpIfNotExcMatch ( Arg < Label > ) = 220 ,
282- LoadAssertionError = 221 , // Placeholder
283276 ReturnConst {
284277 idx : Arg < u32 > ,
285278 } = 222 ,
286279 SetExcInfo = 223 ,
287- Subscript = 224 ,
288280 // CPython 3.14 RESUME (128)
289281 Resume {
290282 arg : Arg < u32 > ,
@@ -441,17 +433,9 @@ impl TryFrom<u8> for Instruction {
441433 u8:: from ( Self :: Continue {
442434 target : Arg :: marker ( ) ,
443435 } ) ,
444- u8:: from ( Self :: JumpIfFalseOrPop {
445- target : Arg :: marker ( ) ,
446- } ) ,
447- u8:: from ( Self :: JumpIfTrueOrPop {
448- target : Arg :: marker ( ) ,
449- } ) ,
450436 u8:: from ( Self :: JumpIfNotExcMatch ( Arg :: marker ( ) ) ) ,
451- u8:: from ( Self :: LoadAssertionError ) ,
452437 u8:: from ( Self :: ReturnConst { idx : Arg :: marker ( ) } ) ,
453438 u8:: from ( Self :: SetExcInfo ) ,
454- u8:: from ( Self :: Subscript ) ,
455439 ] ;
456440
457441 if ( cpython_start..=cpython_end) . contains ( & value)
@@ -478,8 +462,6 @@ impl InstructionMetadata for Instruction {
478462 | Self :: JumpIfNotExcMatch ( l)
479463 | Self :: PopJumpIfTrue { target : l }
480464 | Self :: PopJumpIfFalse { target : l }
481- | Self :: JumpIfTrueOrPop { target : l }
482- | Self :: JumpIfFalseOrPop { target : l }
483465 | Self :: ForIter { target : l }
484466 | Self :: Break { target : l }
485467 | Self :: Continue { target : l }
@@ -525,7 +507,6 @@ impl InstructionMetadata for Instruction {
525507 Self :: DeleteGlobal ( _) => 0 ,
526508 Self :: DeleteDeref ( _) => 0 ,
527509 Self :: LoadFromDictOrDeref ( _) => 1 ,
528- Self :: Subscript => -1 ,
529510 Self :: StoreSubscr => -3 ,
530511 Self :: DeleteSubscr => -2 ,
531512 Self :: LoadAttr { .. } => 0 ,
@@ -551,20 +532,6 @@ impl InstructionMetadata for Instruction {
551532 Self :: Break { .. } => 0 ,
552533 Self :: PopJumpIfTrue { .. } => -1 ,
553534 Self :: PopJumpIfFalse { .. } => -1 ,
554- Self :: JumpIfTrueOrPop { .. } => {
555- if jump {
556- 0
557- } else {
558- -1
559- }
560- }
561- Self :: JumpIfFalseOrPop { .. } => {
562- if jump {
563- 0
564- } else {
565- -1
566- }
567- }
568535 Self :: MakeFunction => {
569536 // CPython 3.14 style: MakeFunction only pops code object
570537 -1 + 1 // pop code, push function
@@ -584,11 +551,9 @@ impl InstructionMetadata for Instruction {
584551 Self :: FormatSimple => 0 ,
585552 Self :: FormatWithSpec => -1 ,
586553 Self :: ForIter { .. } => {
587- if jump {
588- -1
589- } else {
590- 1
591- }
554+ // jump=False: push next value (+1)
555+ // jump=True: iterator stays on stack, no change (0)
556+ if jump { 0 } else { 1 }
592557 }
593558 Self :: IsOp ( _) => -1 ,
594559 Self :: ContainsOp ( _) => -1 ,
@@ -684,7 +649,6 @@ impl InstructionMetadata for Instruction {
684649 Self :: EndFor => 0 ,
685650 Self :: ExitInitCheck => 0 ,
686651 Self :: InterpreterExit => 0 ,
687- Self :: LoadAssertionError => 0 ,
688652 Self :: LoadLocals => 0 ,
689653 Self :: ReturnGenerator => 0 ,
690654 Self :: StoreSlice => 0 ,
@@ -920,9 +884,7 @@ impl InstructionMetadata for Instruction {
920884 Self :: JumpBackward { target } => w ! ( JUMP_BACKWARD , target) ,
921885 Self :: JumpBackwardNoInterrupt { target } => w ! ( JUMP_BACKWARD_NO_INTERRUPT , target) ,
922886 Self :: JumpForward { target } => w ! ( JUMP_FORWARD , target) ,
923- Self :: JumpIfFalseOrPop { target } => w ! ( JUMP_IF_FALSE_OR_POP , target) ,
924887 Self :: JumpIfNotExcMatch ( target) => w ! ( JUMP_IF_NOT_EXC_MATCH , target) ,
925- Self :: JumpIfTrueOrPop { target } => w ! ( JUMP_IF_TRUE_OR_POP , target) ,
926888 Self :: ListAppend { i } => w ! ( LIST_APPEND , i) ,
927889 Self :: ListExtend { i } => w ! ( LIST_EXTEND , i) ,
928890 Self :: LoadAttr { idx } => {
@@ -994,7 +956,6 @@ impl InstructionMetadata for Instruction {
994956 Self :: StoreGlobal ( idx) => w ! ( STORE_GLOBAL , name = idx) ,
995957 Self :: StoreName ( idx) => w ! ( STORE_NAME , name = idx) ,
996958 Self :: StoreSubscr => w ! ( STORE_SUBSCR ) ,
997- Self :: Subscript => w ! ( SUBSCRIPT ) ,
998959 Self :: Swap { index } => w ! ( SWAP , index) ,
999960 Self :: ToBool => w ! ( TO_BOOL ) ,
1000961 Self :: UnpackEx { args } => w ! ( UNPACK_EX , args) ,
0 commit comments