Class MIntInsn

  • All Implemented Interfaces:
    Serializable, xyz.cofe.collection.ImTree<ByteCode>, xyz.cofe.collection.ImTreeWalk<ByteCode>, ByteCode, MethodByteCode, MethodWriter

    public class MIntInsn
    extends MAbstractBC
    implements MethodWriter
    Операции OpCode.BIPUSH, OpCode.SIPUSH, OpCode.NEWARRAY

    BIPUSH

    Непосредственный байт расширяется знаком до значения типа int. Это значение помещается в стек операндов.

    SIPUSH

    Непосредственные значения без знака byte1 и byte2 собираются в промежуточное короткое замыкание, где значение короткого замыкания равно (byte1 << 8) | байт2. Затем промежуточное значение расширяется знаком до значения типа int. Это значение помещается в стек операндов.

    SIPUSH

    A new array whose components are of type atype and of length count is allocated from the garbage-collected heap. A reference arrayref to this new array object is pushed into the operand stack. Each of the elements of the new array is initialized to the default initial value (§2.3, §2.4) for the element type of the array type.

    Новый массив, компоненты которого имеют тип atype и счетчик длины, выделяется из кучи со сборкой мусора. Ссылка arrayref на этот новый объект массива помещается в стек операндов. Каждый из элементов нового массива инициализируется начальным значением по умолчанию (§2.3, §2.4) для типа элемента типа массива.

     ..., count → ..., arrayref
     
    Run-time Exception

    If count is less than zero, newarray throws a NegativeArraySizeException.

    Notes

    In Oracle's Java Virtual Machine implementation, arrays of type boolean (atype is T_BOOLEAN) are stored as arrays of 8-bit values and are manipulated using the baload and bastore instructions (§baload, §bastore) which also access arrays of type byte. Other implementations may implement packed boolean arrays; the baload and bastore instructions must still be used to access those arrays.

    В реализации виртуальной машины Java Oracle массивы типа boolean (тип - T_BOOLEAN) хранятся как массивы 8-битных значений и управляются с помощью инструкций baload и bastore (§baload, §bastore), которые также обращаются к массивам типа byte. Другие реализации могут реализовывать упакованные логические массивы; инструкции baload и bastore по-прежнему должны использоваться для доступа к этим массивам.

    Visits an instruction with a single int operand.
    opcode the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.
    operand the operand of the instruction to be visited.
    When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
    When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
    When opcode is NEWARRAY, operand value should be one of Opcodes.T_BOOLEAN, Opcodes.T_CHAR, Opcodes.T_FLOAT, Opcodes.T_DOUBLE, Opcodes.T_BYTE, Opcodes.T_SHORT, Opcodes.T_INT or Opcodes.T_LONG.

    See Also:
    Serialized Form
    • Constructor Detail

      • MIntInsn

        public MIntInsn()
        Конструктор по умолчанию
      • MIntInsn

        public MIntInsn​(int op,
                        int operand)
      • MIntInsn

        public MIntInsn​(MIntInsn sample)
        Конструктор копирования
        Parameters:
        sample - образец
    • Method Detail

      • getOpcode

        public int getOpcode()
      • setOpcode

        public void setOpcode​(int opcode)
      • getOperand

        public int getOperand()
      • setOperand

        public void setOperand​(int operand)