Enum OpCode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AALOAD
      load onto the stack a reference from an array
      AASTORE
      store a reference in an array
      ACONST_NULL
      push a null reference onto the stack
      ALOAD
      load a reference onto the stack from a local variable #index
      ANEWARRAY
      create a new array of references of length count and component type identified by the class reference index (indexbyte1 << 8 | indexbyte2) in the constant pool
      ARETURN
      return a reference from a method
      ARRAYLENGTH
      get the length of an array
      ASTORE
      store a reference into a local variable #index
      ASTORE_0
      store a reference into local variable 0
      ASTORE_1
      store a reference into local variable 1
      ASTORE_2
      store a reference into local variable 2
      ASTORE_3
      store a reference into local variable 3
      ATHROW
      throws an error or exception (notice that the rest of the stack is cleared, leaving only a reference to the Throwable)
      BALOAD
      load a byte or Boolean value from an array
      BASTORE
      store a byte or Boolean value into an array
      BIPUSH
      push a byte onto the stack as an integer value
      CALOAD
      load a char from an array
      CASTORE
      store a char into an array
      CHECKCAST
      checks whether an objectref is of a certain type, the class reference of which is in the constant pool at index (indexbyte1 << 8 | indexbyte2)
      D2F
      convert an double into a float
      D2I
      convert an double into a int
      D2L
      convert an double into a long
      DADD
      add two doubles
      DALOAD
      load a double from an array
      DASTORE
      store a double into an array
      DCMPG
      compare two doubles, 1 on NaN
      DCMPL
      compare two doubles, -1 on NaN
      DCONST_0
      push 0.0 (double) on the stack
      DCONST_1
      push 1.0 (double) on the stack
      DDIV
      divide two doubles
      DLOAD
      load a double value from a local variable #index
      DMUL
      multiply two doubles
      DNEG
      negate a double
      DREM
      get the remainder from a division between two doubles
      DRETURN
      return a double from a method
      DSTORE
      store a double value into a local variable #index
      DSTORE_0
      store a double into local variable 0
      DSTORE_1
      store a double into local variable 1
      DSTORE_2
      store a double into local variable 2
      DSTORE_3
      store a double into local variable 3
      DSUB
      subtract a double from another
      DUP
      duplicate the value on top of the stack
      DUP_X1
      insert a copy of the top value into the stack two values from the top. value1 and value2 must not be of the type double or long.
      DUP_X2
      insert a copy of the top value into the stack two (if value2 is double or long it takes up the entry of value3, too) or three values (if value2 is neither double nor long) from the top
      DUP2
      duplicate top two stack words (two values, if value1 is not double nor long; a single value, if value1 is double or long)
      DUP2_X1
      duplicate two words and insert beneath third word (see explanation above)
      DUP2_X2
      duplicate two words and insert beneath fourth word
      F2D
      convert an float into a double
      F2I
      convert an float into a int
      F2L
      convert an float into a long
      FADD
      add two floats
      FALOAD
      load a float from an array
      FASTORE
      store a float in an array
      FCMPG
      compare two floats, 1 on NaN
      FCMPL
      compare two floats, -1 on NaN
      FCONST_0
      push 0.0f on the stack
      FCONST_1
      push 1.0f on the stack
      FCONST_2
      push 2.0f on the stack
      FDIV
      divide two floats
      FLOAD
      load a float value from a local variable #index
      FMUL
      multiply two floats
      FNEG
      negate a float
      FREM
      get the remainder from a division between two floats
      FRETURN
      return a float
      FSTORE
      store a float value into a local variable #index
      FSTORE_0
      store a float value into local variable 0
      FSTORE_1
      store a float value into local variable 1
      FSTORE_2
      store a float value into local variable 2
      FSTORE_3
      store a float value into local variable 3
      FSUB
      subtract two floats
      GETFIELD
      get a field value of an object objectref, where the field is identified by field reference in the constant pool index (indexbyte1 << 8 | indexbyte2)
      GETSTATIC
      get a static field value of a class, where the field is identified by field reference in the constant pool index (indexbyte1 << 8 | indexbyte2)
      GOTO
      goes to another instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      GOTO_W
      goes to another instruction at branchoffset (signed int constructed from unsigned bytes branchbyte1 << 24 | branchbyte2 << 16 | branchbyte3 << 8 | branchbyte4)
      I2B
      convert an int into a byte
      I2C
      convert an int into a character
      I2D
      convert an int into a double
      I2F
      convert an int into a float
      I2L
      convert an int into a long
      I2S
      convert an int into a short
      IADD
      add two ints
      IALOAD
      load an int from an array
      IAND
      perform a bitwise AND on two integers
      IASTORE
      store an int into an array
      ICONST_0
      load the int value 0 onto the stack
      ICONST_1
      load the int value 1 onto the stack
      ICONST_2
      load the int value 2 onto the stack
      ICONST_3
      load the int value 3 onto the stack
      ICONST_4
      load the int value 4 onto the stack
      ICONST_5
      load the int value 5 onto the stack
      ICONST_M1
      load the int value −1 onto the stack
      IDIV
      divide two integers
      IF_ACMPEQ
      if references are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ACMPNE
      if references are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPEQ
      if ints are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPGE
      if value1 is greater than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPGT
      if value1 is greater than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPLE
      if value1 is less than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPLT
      if value1 is less than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IF_ICMPNE
      if ints are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFEQ
      if value is 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFGE
      if value is greater than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFGT
      if value is greater than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFLE
      if value is less than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFLT
      if value is less than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFNE
      if value is not 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFNONNULL
      Официальная дока if value is not null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IFNULL
      if value is null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
      IINC
      increment local variable #index by signed byte const
      ILOAD
      load an int value from a local variable #index
      IMUL
      multiply two integers
      INEG
      negate int
      INSTANCEOF
      determines if an object objectref is of a given type, identified by class reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      INVOKEDYNAMIC
      invokes a dynamic method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      INVOKEINTERFACE
      invokes an interface method on object objectref and puts the result on the stack (might be void); the interface method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      INVOKESPECIAL
      invoke instance method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      INVOKESTATIC
      invoke a static method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      INVOKEVIRTUAL
      invoke virtual method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      IOR
      bitwise int OR
      IREM
      logical int remainder
      IRETURN
      return an integer from a method
      ISHL
      int shift left
      ISHR
      int arithmetic shift right
      ISTORE
      load a reference onto the stack from a local variable #index
      ISUB
      int subtract
      IUSHR
      int logical shift right
      IXOR
      int xor
      JSR
      jump to subroutine at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2) and place the return address on the stack
      L2D
      convert an long into a double
      L2F
      convert an long into a float
      L2I
      convert an long into a int
      LADD
      add two longs
      LALOAD
      load a long from an array
      LAND
      bitwise AND of two longs
      LASTORE
      store a long to an array
      LCMP
      push 0 if the two longs are the same, 1 if value1 is greater than value2, -1 otherwise
      LCONST_0
      push 0L (the number zero with type long) onto the stack
      LCONST_1
      push 1L (the number one with type long) onto the stack
      LDC
      push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack
      LDC_W
      push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)
      LDC2_W
      push a constant #index from a constant pool (double, long, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)
      LDIV
      divide two longs
      LLOAD
      load a long value from a local variable #index
      LMUL
      multiply two longs
      LNEG
      negate a long
      LOOKUPSWITCH
      a target address is looked up from a table using a key and execution continues from the instruction at that address
      LOR
      bitwise OR of two longs
      LREM
      remainder of division of two longs
      LRETURN
      return a long value
      LSHL
      bitwise shift left of a long value1 by int value2 positions
      LSHR
      bitwise shift right of a long value1 by int value2 positions
      LSTORE
      store a long value in a local variable #index
      LSTORE_0
      store a long value in a local variable 0
      LSTORE_1
      store a long value in a local variable 1
      LSTORE_2
      store a long value in a local variable 2
      LSTORE_3
      store a long value in a local variable 3
      LSUB
      subtract two longs
      LUSHR
      bitwise shift right of a long value1 by int value2 positions, unsigned
      LXOR
      bitwise XOR of two longs
      MONITORENTER
      enter monitor for object ("grab the lock" – start of synchronized() section)
      MONITOREXIT
      exit monitor for object ("release the lock" – end of synchronized() section)
      MULTIANEWARRAY
      create a new array of dimensions dimensions of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2); the sizes of each dimension is identified by count1, [count2, etc.]
      NEW
      create new object of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2)
      NEWARRAY
      create new array with count elements of primitive type identified by atype
      NOP
      perform no operation
      POP
      discard the top value on the stack
      POP2
      discard the top two values on the stack (or one value, if it is a double or long)
      PUTFIELD
      set field to value in an object objectref, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      PUTSTATIC
      set static field to value in a class, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)
      RET
      continue execution from address taken from a local variable #index (the asymmetry with jsr is intentional)
      RETURN
      return void from method
      SALOAD
      load short from array
      SASTORE
      store short to array
      SIPUSH
      push a short onto the stack as an integer value
      SWAP
      swaps two top words on the stack (note that value1 and value2 must not be double or long)
      TABLESWITCH
      continue execution from an address in the table at offset index
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int code  
    • Enum Constant Detail

      • NOP

        public static final OpCode NOP
        perform no operation

        Стек [No change]

      • ACONST_NULL

        public static final OpCode ACONST_NULL
        push a null reference onto the stack

        Стек → null

      • ICONST_M1

        public static final OpCode ICONST_M1
        load the int value −1 onto the stack

        Стек → -1

      • ICONST_0

        public static final OpCode ICONST_0
        load the int value 0 onto the stack

        Стек → 0

      • ICONST_1

        public static final OpCode ICONST_1
        load the int value 1 onto the stack

        Стек → 1

      • ICONST_2

        public static final OpCode ICONST_2
        load the int value 2 onto the stack

        Стек → 2

      • ICONST_3

        public static final OpCode ICONST_3
        load the int value 3 onto the stack

        Стек → 3

      • ICONST_4

        public static final OpCode ICONST_4
        load the int value 4 onto the stack

        Стек → 4

      • ICONST_5

        public static final OpCode ICONST_5
        load the int value 5 onto the stack

        Стек → 5

      • LCONST_0

        public static final OpCode LCONST_0
        push 0L (the number zero with type long) onto the stack

        Стек → 0

      • LCONST_1

        public static final OpCode LCONST_1
        push 1L (the number one with type long) onto the stack

        Стек → 1

      • FCONST_0

        public static final OpCode FCONST_0
        push 0.0f on the stack

        Стек → 0f

      • FCONST_1

        public static final OpCode FCONST_1
        push 1.0f on the stack

        Стек → 1f

      • FCONST_2

        public static final OpCode FCONST_2
        push 2.0f on the stack

        Стек → 2f

      • DCONST_0

        public static final OpCode DCONST_0
        push 0.0 (double) on the stack

        Стек → 0.0

      • DCONST_1

        public static final OpCode DCONST_1
        push 1.0 (double) on the stack

        Стек → 1.0

      • BIPUSH

        public static final OpCode BIPUSH
        push a byte onto the stack as an integer value

        Параметры 1: byte

        Стек → value

      • SIPUSH

        public static final OpCode SIPUSH
        push a short onto the stack as an integer value

        Параметры 2: byte1, byte2

        Стек → value

      • LDC

        public static final OpCode LDC
        push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack

        Параметры 1: index

        Стек → value

      • LDC_W

        public static final OpCode LDC_W
        push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек → value

      • LDC2_W

        public static final OpCode LDC2_W
        push a constant #index from a constant pool (double, long, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек → value

      • ILOAD

        public static final OpCode ILOAD
        load an int value from a local variable #index

        Параметры 1: index

        Стек → value

      • LLOAD

        public static final OpCode LLOAD
        load a long value from a local variable #index

        Параметры 1: index

        Стек → value

      • FLOAD

        public static final OpCode FLOAD
        load a float value from a local variable #index

        Параметры 1: index

        Стек → value

      • DLOAD

        public static final OpCode DLOAD
        load a double value from a local variable #index

        Параметры 1: index

        Стек → value

      • ALOAD

        public static final OpCode ALOAD
        load a reference onto the stack from a local variable #index

        Параметры 1: index

        Стек → objectref

      • IALOAD

        public static final OpCode IALOAD
        load an int from an array

        Стек arrayref, index → value

      • LALOAD

        public static final OpCode LALOAD
        load a long from an array

        Стек arrayref, index → value

      • FALOAD

        public static final OpCode FALOAD
        load a float from an array

        Стек arrayref, index → value

      • DALOAD

        public static final OpCode DALOAD
        load a double from an array

        Стек arrayref, index → value

      • AALOAD

        public static final OpCode AALOAD
        load onto the stack a reference from an array

        Стек arrayref, index → value

      • BALOAD

        public static final OpCode BALOAD
        load a byte or Boolean value from an array

        Стек arrayref, index → value

      • CALOAD

        public static final OpCode CALOAD
        load a char from an array

        Стек arrayref, index → value

      • SALOAD

        public static final OpCode SALOAD
        load short from array

        Стек arrayref, index → value

      • ISTORE

        public static final OpCode ISTORE
        load a reference onto the stack from a local variable #index

        Параметры 1: index

        Стек → objectref

      • LSTORE

        public static final OpCode LSTORE
        store a long value in a local variable #index

        Параметры 1: index

        Стек value →

      • LSTORE_0

        public static final OpCode LSTORE_0
        store a long value in a local variable 0

        Стек value →

      • LSTORE_1

        public static final OpCode LSTORE_1
        store a long value in a local variable 1

        Стек value →

      • LSTORE_2

        public static final OpCode LSTORE_2
        store a long value in a local variable 2

        Стек value →

      • LSTORE_3

        public static final OpCode LSTORE_3
        store a long value in a local variable 3

        Стек value →

      • FSTORE

        public static final OpCode FSTORE
        store a float value into a local variable #index

        Параметры 1: index

        Стек value →

      • FSTORE_0

        public static final OpCode FSTORE_0
        store a float value into local variable 0

        Стек value →

      • FSTORE_1

        public static final OpCode FSTORE_1
        store a float value into local variable 1

        Стек value →

      • FSTORE_2

        public static final OpCode FSTORE_2
        store a float value into local variable 2

        Стек value →

      • FSTORE_3

        public static final OpCode FSTORE_3
        store a float value into local variable 3

        Стек value →

      • DSTORE

        public static final OpCode DSTORE
        store a double value into a local variable #index

        Параметры 1: index

        Стек value →

      • DSTORE_0

        public static final OpCode DSTORE_0
        store a double into local variable 0

        Параметры 1: index

        Стек value →

      • DSTORE_1

        public static final OpCode DSTORE_1
        store a double into local variable 1

        Параметры

        Стек value →

      • DSTORE_2

        public static final OpCode DSTORE_2
        store a double into local variable 2

        Стек value →

      • DSTORE_3

        public static final OpCode DSTORE_3
        store a double into local variable 3

        Стек value →

      • ASTORE

        public static final OpCode ASTORE
        store a reference into a local variable #index

        Параметры 1: index

        Стек objectref →

      • ASTORE_0

        public static final OpCode ASTORE_0
        store a reference into local variable 0

        Стек objectref →

      • ASTORE_1

        public static final OpCode ASTORE_1
        store a reference into local variable 1

        Стек objectref →

      • ASTORE_2

        public static final OpCode ASTORE_2
        store a reference into local variable 2

        Стек objectref →

      • ASTORE_3

        public static final OpCode ASTORE_3
        store a reference into local variable 3

        Стек objectref →

      • IASTORE

        public static final OpCode IASTORE
        store an int into an array

        Стек arrayref, index, value →

      • LASTORE

        public static final OpCode LASTORE
        store a long to an array

        Стек arrayref, index, value →

      • FASTORE

        public static final OpCode FASTORE
        store a float in an array

        Стек arrayref, index, value →

      • DASTORE

        public static final OpCode DASTORE
        store a double into an array

        Стек arrayref, index, value →

      • AASTORE

        public static final OpCode AASTORE
        store a reference in an array

        Стек arrayref, index, value →

      • BASTORE

        public static final OpCode BASTORE
        store a byte or Boolean value into an array

        Стек arrayref, index, value →

      • CASTORE

        public static final OpCode CASTORE
        store a char into an array

        Стек arrayref, index, value →

      • SASTORE

        public static final OpCode SASTORE
        store short to array

        Стек arrayref, index, value →

      • POP

        public static final OpCode POP
        discard the top value on the stack

        Стек value →

      • POP2

        public static final OpCode POP2
        discard the top two values on the stack (or one value, if it is a double or long)

        Стек {value2, value1} →

      • DUP

        public static final OpCode DUP
        duplicate the value on top of the stack

        Стек value → value, value

      • DUP_X1

        public static final OpCode DUP_X1
        insert a copy of the top value into the stack two values from the top. value1 and value2 must not be of the type double or long.

        Стек value2, value1 → value1, value2, value1

      • DUP_X2

        public static final OpCode DUP_X2
        insert a copy of the top value into the stack two (if value2 is double or long it takes up the entry of value3, too) or three values (if value2 is neither double nor long) from the top

        Стек value3, value2, value1 → value1, value3, value2, value1

      • DUP2

        public static final OpCode DUP2
        duplicate top two stack words (two values, if value1 is not double nor long; a single value, if value1 is double or long)

        Стек {value2, value1} → {value2, value1}, {value2, value1}

      • DUP2_X1

        public static final OpCode DUP2_X1
        duplicate two words and insert beneath third word (see explanation above)

        Стек value3, {value2, value1} → {value2, value1}, value3, {value2, value1}

      • DUP2_X2

        public static final OpCode DUP2_X2
        duplicate two words and insert beneath fourth word

        Стек {value4, value3}, {value2, value1} → {value2, value1}, {value4, value3}, {value2, value1}

      • SWAP

        public static final OpCode SWAP
        swaps two top words on the stack (note that value1 and value2 must not be double or long)

        Стек value2, value1 → value1, value2

      • IADD

        public static final OpCode IADD
        add two ints

        Стек value1, value2 → result

      • LADD

        public static final OpCode LADD
        add two longs

        Стек value1, value2 → result

      • FADD

        public static final OpCode FADD
        add two floats

        Стек value1, value2 → result

      • DADD

        public static final OpCode DADD
        add two doubles

        Стек value1, value2 → result

      • ISUB

        public static final OpCode ISUB
        int subtract

        Стек value1, value2 → result

      • LSUB

        public static final OpCode LSUB
        subtract two longs

        Стек value1, value2 → result

      • FSUB

        public static final OpCode FSUB
        subtract two floats

        Стек value1, value2 → result

      • DSUB

        public static final OpCode DSUB
        subtract a double from another

        Стек value1, value2 → result

      • IMUL

        public static final OpCode IMUL
        multiply two integers

        Стек value1, value2 → result

      • LMUL

        public static final OpCode LMUL
        multiply two longs

        Стек value1, value2 → result

      • FMUL

        public static final OpCode FMUL
        multiply two floats

        Стек value1, value2 → result

      • DMUL

        public static final OpCode DMUL
        multiply two doubles

        Стек value1, value2 → result

      • IDIV

        public static final OpCode IDIV
        divide two integers

        Стек value1, value2 → result

      • LDIV

        public static final OpCode LDIV
        divide two longs

        Стек value1, value2 → result

      • FDIV

        public static final OpCode FDIV
        divide two floats

        Стек value1, value2 → result

      • DDIV

        public static final OpCode DDIV
        divide two doubles

        Стек value1, value2 → result

      • IREM

        public static final OpCode IREM
        logical int remainder

        Стек value1, value2 → result

      • LREM

        public static final OpCode LREM
        remainder of division of two longs

        Стек value1, value2 → result

      • FREM

        public static final OpCode FREM
        get the remainder from a division between two floats

        Стек value1, value2 → result

      • DREM

        public static final OpCode DREM
        get the remainder from a division between two doubles

        Стек value1, value2 → result

      • INEG

        public static final OpCode INEG
        negate int

        Стек value → result

      • LNEG

        public static final OpCode LNEG
        negate a long

        Стек value → result

      • FNEG

        public static final OpCode FNEG
        negate a float

        Стек value → result

      • DNEG

        public static final OpCode DNEG
        negate a double

        Стек value → result

      • ISHL

        public static final OpCode ISHL
        int shift left

        Стек value1, value2 → result

      • LSHL

        public static final OpCode LSHL
        bitwise shift left of a long value1 by int value2 positions

        Стек value1, value2 → result

      • ISHR

        public static final OpCode ISHR
        int arithmetic shift right

        Стек value1, value2 → result

      • LSHR

        public static final OpCode LSHR
        bitwise shift right of a long value1 by int value2 positions

        Стек value1, value2 → result

      • IUSHR

        public static final OpCode IUSHR
        int logical shift right

        Стек value1, value2 → result

      • LUSHR

        public static final OpCode LUSHR
        bitwise shift right of a long value1 by int value2 positions, unsigned

        Стек value1, value2 → result

      • IAND

        public static final OpCode IAND
        perform a bitwise AND on two integers

        Стек value1, value2 → result

      • LAND

        public static final OpCode LAND
        bitwise AND of two longs

        Стек value1, value2 → result

      • IOR

        public static final OpCode IOR
        bitwise int OR

        Стек value1, value2 → result

      • LOR

        public static final OpCode LOR
        bitwise OR of two longs

        Стек value1, value2 → result

      • IXOR

        public static final OpCode IXOR
        int xor

        Стек value1, value2 → result

      • LXOR

        public static final OpCode LXOR
        bitwise XOR of two longs

        Стек value1, value2 → result

      • IINC

        public static final OpCode IINC
        increment local variable #index by signed byte const

        Параметры 2: index, const

        Стек [No change]

      • I2L

        public static final OpCode I2L
        convert an int into a long

        Стек value → result

      • I2F

        public static final OpCode I2F
        convert an int into a float

        Стек value → result

      • I2D

        public static final OpCode I2D
        convert an int into a double

        Стек value → result

      • L2I

        public static final OpCode L2I
        convert an long into a int

        Стек value → result

      • L2F

        public static final OpCode L2F
        convert an long into a float

        Стек value → result

      • L2D

        public static final OpCode L2D
        convert an long into a double

        Стек value → result

      • F2I

        public static final OpCode F2I
        convert an float into a int

        Стек value → result

      • F2L

        public static final OpCode F2L
        convert an float into a long

        Стек value → result

      • F2D

        public static final OpCode F2D
        convert an float into a double

        Стек value → result

      • D2I

        public static final OpCode D2I
        convert an double into a int

        Стек value → result

      • D2L

        public static final OpCode D2L
        convert an double into a long

        Стек value → result

      • D2F

        public static final OpCode D2F
        convert an double into a float

        Стек value → result

      • I2B

        public static final OpCode I2B
        convert an int into a byte

        Стек value → result

      • I2C

        public static final OpCode I2C
        convert an int into a character

        Стек value → result

      • I2S

        public static final OpCode I2S
        convert an int into a short

        Стек value → result

      • LCMP

        public static final OpCode LCMP
        push 0 if the two longs are the same, 1 if value1 is greater than value2, -1 otherwise

        Стек value1, value2 → result

      • FCMPL

        public static final OpCode FCMPL
        compare two floats, -1 on NaN

        Стек value1, value2 → result

      • FCMPG

        public static final OpCode FCMPG
        compare two floats, 1 on NaN

        Стек value1, value2 → result

      • DCMPL

        public static final OpCode DCMPL
        compare two doubles, -1 on NaN

        Стек value1, value2 → result

      • DCMPG

        public static final OpCode DCMPG
        compare two doubles, 1 on NaN

        Стек value1, value2 → result

      • IFEQ

        public static final OpCode IFEQ
        if value is 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IFNE

        public static final OpCode IFNE
        if value is not 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IFLT

        public static final OpCode IFLT
        if value is less than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IFGE

        public static final OpCode IFGE
        if value is greater than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IFGT

        public static final OpCode IFGT
        if value is greater than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IFLE

        public static final OpCode IFLE
        if value is less than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

      • IF_ICMPEQ

        public static final OpCode IF_ICMPEQ
        if ints are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ICMPNE

        public static final OpCode IF_ICMPNE
        if ints are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ICMPLT

        public static final OpCode IF_ICMPLT
        if value1 is less than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ICMPGE

        public static final OpCode IF_ICMPGE
        if value1 is greater than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ICMPGT

        public static final OpCode IF_ICMPGT
        if value1 is greater than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ICMPLE

        public static final OpCode IF_ICMPLE
        if value1 is less than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ACMPEQ

        public static final OpCode IF_ACMPEQ
        if references are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • IF_ACMPNE

        public static final OpCode IF_ACMPNE
        if references are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value1, value2 →

      • GOTO

        public static final OpCode GOTO
        goes to another instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек [no change]

      • GOTO_W

        public static final OpCode GOTO_W
        goes to another instruction at branchoffset (signed int constructed from unsigned bytes branchbyte1 << 24 | branchbyte2 << 16 | branchbyte3 << 8 | branchbyte4)

        Параметры 4: branchbyte1, branchbyte2, branchbyte3, branchbyte4

        Стек [no change]

      • JSR

        public static final OpCode JSR
        jump to subroutine at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2) and place the return address on the stack

        Параметры 2: branchbyte1, branchbyte2

        Стек → address


        Description

        The address of the opcode of the instruction immediately following this jsr instruction is pushed onto the operand stack as a value of type returnAddress. The unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is (branchbyte1 << 8) | branchbyte2. Execution proceeds at that offset from the address of this jsr instruction. The target address must be that of an opcode of an instruction within the method that contains this jsr instruction.

        Notes

        Note that jsr pushes the address onto the operand stack and ret (§ret) gets it out of a local variable. This asymmetry is intentional.

        In Oracle's implementation of a compiler for the Java programming language prior to Java SE 6, the jsr instruction was used with the ret instruction in the implementation of the finally clause (§3.13, §4.10.2.5).


        Описание

        Адрес кода операции инструкции, следующей сразу за этой инструкцией jsr, помещается в стек операндов как значение типа returnAddress. Беззнаковые branchbyte1 и branchbyte2 используются для создания подписанного 16-битного смещения, где смещение равно (branchbyte1 << 8) | branchbyte2. Выполнение продолжается с этого смещения от адреса этой инструкции jsr. Целевой адрес должен соответствовать коду операции инструкции в методе, который содержит эту инструкцию jsr.

        Примечания

        Обратите внимание, что jsr помещает адрес в стек операндов, а ret (§ret) получает его из локальной переменной. Эта асимметрия преднамеренная.

        В реализации Oracle компилятора для языка программирования Java до Java SE 6 инструкция jsr использовалась с инструкцией ret в реализации предложения finally (§3.13, §4.10.2.5).

      • RET

        public static final OpCode RET
        continue execution from address taken from a local variable #index (the asymmetry with jsr is intentional)

        Параметры 1: index

        Стек [No change]


        Обратите внимание, что jsr (§jsr) помещает адрес в стек операндов, а ret получает его из локальной переменной. Эта асимметрия преднамеренная.

        В реализации Oracle компилятора для языка программирования Java до Java SE 6 инструкция ret использовалась с инструкциями jsr и jsr_w (§jsr, §jsr_w) в реализации предложения finally (§3.13, §4.10.2.5) ).

        Инструкцию ret не следует путать с инструкцией return (§return). Команда возврата возвращает управление от метода вызывающей стороне, не передавая никакого значения обратно вызывающей стороне.

        Код операции ret может использоваться вместе с инструкцией wide (§wide) для доступа к локальной переменной с использованием двухбайтового беззнакового индекса.

      • TABLESWITCH

        public static final OpCode TABLESWITCH
        continue execution from an address in the table at offset index

        Параметры 16+: [0–3 bytes padding], defaultbyte1, defaultbyte2, defaultbyte3, defaultbyte4, lowbyte1, lowbyte2, lowbyte3, lowbyte4, highbyte1, highbyte2, highbyte3, highbyte4, jump offsets...

        Стек index →

      • LOOKUPSWITCH

        public static final OpCode LOOKUPSWITCH
        a target address is looked up from a table using a key and execution continues from the instruction at that address

        Параметры 8+: <0 - 3 bytes padding>, defaultbyte1, defaultbyte2, defaultbyte3, defaultbyte4, npairs1, npairs2, npairs3, npairs4, match-offset pairs...

        Стек key →

      • IRETURN

        public static final OpCode IRETURN
        return an integer from a method

        Стек value → [empty]

      • LRETURN

        public static final OpCode LRETURN
        return a long value

        Стек value → [empty]

      • FRETURN

        public static final OpCode FRETURN
        return a float

        Стек value → [empty]

      • DRETURN

        public static final OpCode DRETURN
        return a double from a method

        Стек value → [empty]

      • ARETURN

        public static final OpCode ARETURN
        return a reference from a method

        Стек objectref → [empty]

      • RETURN

        public static final OpCode RETURN
        return void from method

        Стек → [empty]

      • GETSTATIC

        public static final OpCode GETSTATIC
        get a static field value of a class, where the field is identified by field reference in the constant pool index (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек → value

      • PUTSTATIC

        public static final OpCode PUTSTATIC
        set static field to value in a class, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек value →

      • GETFIELD

        public static final OpCode GETFIELD
        get a field value of an object objectref, where the field is identified by field reference in the constant pool index (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref → value

      • PUTFIELD

        public static final OpCode PUTFIELD
        set field to value in an object objectref, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref, value →

      • INVOKEVIRTUAL

        public static final OpCode INVOKEVIRTUAL
        invoke virtual method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref, [arg1, arg2, ...] → result

      • INVOKESPECIAL

        public static final OpCode INVOKESPECIAL
        invoke instance method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref, [arg1, arg2, ...] → result

      • INVOKESTATIC

        public static final OpCode INVOKESTATIC
        invoke a static method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек [arg1, arg2, ...] → result

      • INVOKEINTERFACE

        public static final OpCode INVOKEINTERFACE
        invokes an interface method on object objectref and puts the result on the stack (might be void); the interface method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 4: indexbyte1, indexbyte2, count, 0

        Стек objectref, [arg1, arg2, ...] → result

      • INVOKEDYNAMIC

        public static final OpCode INVOKEDYNAMIC
        invokes a dynamic method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 4: indexbyte1, indexbyte2, 0, 0

        Стек [arg1, arg2, ...] → result

      • NEW

        public static final OpCode NEW
        create new object of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек → objectref

      • NEWARRAY

        public static final OpCode NEWARRAY
        create new array with count elements of primitive type identified by atype

        Параметры 1: atype

        Стек count → arrayref

      • ANEWARRAY

        public static final OpCode ANEWARRAY
        create a new array of references of length count and component type identified by the class reference index (indexbyte1 << 8 | indexbyte2) in the constant pool

        Параметры 2: indexbyte1, indexbyte2

        Стек count → arrayref

      • ARRAYLENGTH

        public static final OpCode ARRAYLENGTH
        get the length of an array

        Стек arrayref → length

      • ATHROW

        public static final OpCode ATHROW
        throws an error or exception (notice that the rest of the stack is cleared, leaving only a reference to the Throwable)

        Стек objectref → [empty], objectref

      • CHECKCAST

        public static final OpCode CHECKCAST
        checks whether an objectref is of a certain type, the class reference of which is in the constant pool at index (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref → objectref

      • INSTANCEOF

        public static final OpCode INSTANCEOF
        determines if an object objectref is of a given type, identified by class reference index in constant pool (indexbyte1 << 8 | indexbyte2)

        Параметры 2: indexbyte1, indexbyte2

        Стек objectref → result

      • MONITORENTER

        public static final OpCode MONITORENTER
        enter monitor for object ("grab the lock" – start of synchronized() section)

        Стек objectref →

      • MONITOREXIT

        public static final OpCode MONITOREXIT
        exit monitor for object ("release the lock" – end of synchronized() section)

        Стек objectref →

      • MULTIANEWARRAY

        public static final OpCode MULTIANEWARRAY
        create a new array of dimensions dimensions of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2); the sizes of each dimension is identified by count1, [count2, etc.]

        Параметры 3: indexbyte1, indexbyte2, dimensions

        Стек count1, [count2,...] → arrayref

        Из оф доки Format

         multianewarray
         indexbyte1
         indexbyte2
         dimensions
         
        Forms
         multianewarray = 197 (0xc5)
        Operand Stack
         .., count1, [count2, ...] →
         .., arrayref
         
        Description

        The dimensions operand is an unsigned byte that must be greater than or equal to 1. It represents the number of dimensions of the array to be created. The operand stack must contain dimensions values. Each such value represents the number of components in a dimension of the array to be created, must be of type int, and must be non-negative. The count1 is the desired length in the first dimension, count2 in the second, etc.

        All of the count values are popped off the operand stack. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The run-time constant pool item at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved (§5.4.3.1). The resulting entry must be an array class type of dimensionality greater than or equal to dimensions.

        A new multidimensional array of the array type is allocated from the garbage-collected heap. If any count value is zero, no subsequent dimensions are allocated. The components of the array in the first dimension are initialized to subarrays of the type of the second dimension, and so on. The components of the last allocated dimension of the array are initialized to the default initial value (§2.3, §2.4) for the element type of the array type. A reference arrayref to the new array is pushed onto the operand stack.

        Linking Exceptions

        During resolution of the symbolic reference to the class, array, or interface type, any of the exceptions documented in §5.4.3.1 can be thrown.

        Otherwise, if the current class does not have permission to access the element type of the resolved array class, multianewarray throws an IllegalAccessError.

        Run-time Exception

        Otherwise, if any of the dimensions values on the operand stack are less than zero, the multianewarray instruction throws a NegativeArraySizeException.

        Notes

        It may be more efficient to use newarray or anewarray (§newarray, §anewarray) when creating an array of a single dimension.

        The array class referenced via the run-time constant pool may have more dimensions than the dimensions operand of the multianewarray instruction. In that case, only the first dimensions of the dimensions of the array are created.

      • IFNULL

        public static final OpCode IFNULL
        if value is null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

        Из оф доки Description

        The value must of type reference. It is popped from the operand stack. If value is null, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifnull instruction. The target address must be that of an opcode of an instruction within the method that contains this ifnull instruction.

        Otherwise, execution proceeds at the address of the instruction following this ifnull instruction.

      • IFNONNULL

        public static final OpCode IFNONNULL
        Официальная дока if value is not null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)

        Параметры 2: branchbyte1, branchbyte2

        Стек value →

        Description

        The value must be of type reference. It is popped from the operand stack. If value is not null, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifnonnull instruction. The target address must be that of an opcode of an instruction within the method that contains this ifnonnull instruction.

        Otherwise, execution proceeds at the address of the instruction following this ifnonnull instruction.

    • Field Detail

      • code

        public final int code
    • Method Detail

      • values

        public static OpCode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (OpCode c : OpCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OpCode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null