@@ -655,34 +655,23 @@ public String namedOpcode() {
655655 public int getRequiredStackValuesCount () {
656656 return switch (this .opcode ) {
657657 // Unary operations (one value)
658- case Opcodes .ISTORE , Opcodes .LSTORE , Opcodes .FSTORE , Opcodes .DSTORE , Opcodes .ASTORE , Opcodes .POP , Opcodes .POP2 ,
659- Opcodes .DUP , Opcodes .DUP_X1 , Opcodes .DUP_X2 , Opcodes .DUP2 , Opcodes .DUP2_X1 , Opcodes .DUP2_X2 , Opcodes .SWAP ,
660- Opcodes .INEG , Opcodes .LNEG , Opcodes .FNEG , Opcodes .DNEG , Opcodes .I2L , Opcodes .I2F , Opcodes .I2D , Opcodes .L2I ,
661- Opcodes .L2F , Opcodes .L2D , Opcodes .F2I , Opcodes .F2L , Opcodes .F2D , Opcodes .D2I , Opcodes .D2L , Opcodes .D2F ,
662- Opcodes .I2B , Opcodes .I2C , Opcodes .I2S , Opcodes .IFEQ , Opcodes .IFNE , Opcodes .IFLT , Opcodes .IFGE , Opcodes .IFGT ,
663- Opcodes .IFLE , Opcodes .TABLESWITCH , Opcodes .LOOKUPSWITCH , Opcodes .IRETURN , Opcodes .LRETURN , Opcodes .FRETURN ,
664- Opcodes .DRETURN , Opcodes .ARETURN , Opcodes .PUTSTATIC , Opcodes .GETFIELD , Opcodes .NEWARRAY , Opcodes .ANEWARRAY ,
665- Opcodes .ARRAYLENGTH , Opcodes .ATHROW , Opcodes .CHECKCAST , Opcodes .INSTANCEOF , Opcodes .MONITORENTER ,
666- Opcodes .MONITOREXIT , Opcodes .IFNULL , Opcodes .IFNONNULL -> 1 ;
658+ case ISTORE , LSTORE , FSTORE , DSTORE , ASTORE , POP , POP2 , DUP , DUP_X1 , DUP_X2 , DUP2 , DUP2_X1 , DUP2_X2 , SWAP , INEG ,
659+ LNEG , FNEG , DNEG , I2L , I2F , I2D , L2I , L2F , L2D , F2I , F2L , F2D , D2I , D2L , D2F , I2B , I2C , I2S , IFEQ , IFNE ,
660+ IFLT , IFGE , IFGT , IFLE , TABLESWITCH , LOOKUPSWITCH , IRETURN , LRETURN , FRETURN , DRETURN , ARETURN , PUTSTATIC ,
661+ GETFIELD , NEWARRAY , ANEWARRAY , ARRAYLENGTH , ATHROW , CHECKCAST , INSTANCEOF , MONITORENTER , MONITOREXIT , IFNULL ,
662+ IFNONNULL -> 1 ;
667663 // Binary operations (two values)
668- case Opcodes .IALOAD , Opcodes .LALOAD , Opcodes .FALOAD , Opcodes .DALOAD , Opcodes .AALOAD , Opcodes .BALOAD ,
669- Opcodes .CALOAD , Opcodes .SALOAD , Opcodes .IADD , Opcodes .LADD , Opcodes .FADD , Opcodes .DADD , Opcodes .ISUB ,
670- Opcodes .LSUB , Opcodes .FSUB , Opcodes .DSUB , Opcodes .IMUL , Opcodes .LMUL , Opcodes .FMUL , Opcodes .DMUL ,
671- Opcodes .IDIV , Opcodes .LDIV , Opcodes .FDIV , Opcodes .DDIV , Opcodes .IREM , Opcodes .LREM , Opcodes .FREM ,
672- Opcodes .DREM , Opcodes .ISHL , Opcodes .LSHL , Opcodes .ISHR , Opcodes .LSHR , Opcodes .IUSHR , Opcodes .LUSHR ,
673- Opcodes .IAND , Opcodes .LAND , Opcodes .IOR , Opcodes .LOR , Opcodes .IXOR , Opcodes .LXOR , Opcodes .LCMP ,
674- Opcodes .FCMPL , Opcodes .FCMPG , Opcodes .DCMPL , Opcodes .DCMPG , Opcodes .IF_ICMPEQ , Opcodes .IF_ICMPNE ,
675- Opcodes .IF_ICMPLT , Opcodes .IF_ICMPGE , Opcodes .IF_ICMPGT , Opcodes .IF_ICMPLE , Opcodes .IF_ACMPEQ ,
676- Opcodes .IF_ACMPNE , Opcodes .PUTFIELD -> 2 ;
664+ case IALOAD , LALOAD , FALOAD , DALOAD , AALOAD , BALOAD , CALOAD , SALOAD , IADD , LADD , FADD , DADD , ISUB , LSUB , FSUB ,
665+ DSUB , IMUL , LMUL , FMUL , DMUL , IDIV , LDIV , FDIV , DDIV , IREM , LREM , FREM , DREM , ISHL , LSHL , ISHR , LSHR , IUSHR ,
666+ LUSHR , IAND , LAND , IOR , LOR , IXOR , LXOR , LCMP , FCMPL , FCMPG , DCMPL , DCMPG , IF_ICMPEQ , IF_ICMPNE , IF_ICMPLT ,
667+ IF_ICMPGE , IF_ICMPGT , IF_ICMPLE , IF_ACMPEQ , IF_ACMPNE , PUTFIELD -> 2 ;
677668 // Ternary operations (three values)
678- case Opcodes .IASTORE , Opcodes .LASTORE , Opcodes .FASTORE , Opcodes .DASTORE , Opcodes .AASTORE , Opcodes .BASTORE ,
679- Opcodes .CASTORE , Opcodes .SASTORE -> 3 ;
669+ case IASTORE , LASTORE , FASTORE , DASTORE , AASTORE , BASTORE , CASTORE , SASTORE -> 3 ;
680670
681671 // Method invocation
682- case Opcodes .INVOKEVIRTUAL , Opcodes .INVOKESPECIAL , Opcodes .INVOKESTATIC , Opcodes .INVOKEINTERFACE ,
683- Opcodes .INVOKEDYNAMIC -> getRequiredStackValuesCountForMethodInvocation ();
672+ case INVOKEVIRTUAL , INVOKESPECIAL , INVOKESTATIC , INVOKEINTERFACE , INVOKEDYNAMIC -> getRequiredStackValuesCountForMethodInvocation ();
684673 // Multi-dimensional array creation
685- case Opcodes . MULTIANEWARRAY -> ((MultiANewArrayInsnNode ) this ).dims ;
674+ case MULTIANEWARRAY -> ((MultiANewArrayInsnNode ) this ).dims ;
686675
687676 default -> throw new IllegalStateException ("Unknown opcode: " + this );
688677 };
@@ -702,7 +691,7 @@ private int getRequiredStackValuesCountForMethodInvocation() {
702691 }
703692
704693 int count = Type .getArgumentCount (desc ); // Arguments count = Stack values count
705- if (this .getOpcode () != Opcodes . INVOKESTATIC && this .getOpcode () != Opcodes . INVOKEDYNAMIC ) {
694+ if (this .getOpcode () != INVOKESTATIC && this .getOpcode () != INVOKEDYNAMIC ) {
706695 count ++; // "this" reference
707696 }
708697
0 commit comments