Class MIntInsn
- java.lang.Object
-
- xyz.cofe.trambda.bc.mth.MAbstractBC
-
- xyz.cofe.trambda.bc.mth.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.NEWARRAYBIPUSH
Непосредственный байт расширяется знаком до значения типа 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 ExceptionIf 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.
opcodethe opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.operandthe 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 ofOpcodes.T_BOOLEAN,Opcodes.T_CHAR,Opcodes.T_FLOAT,Opcodes.T_DOUBLE,Opcodes.T_BYTE,Opcodes.T_SHORT,Opcodes.T_INTorOpcodes.T_LONG.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MIntInsnclone()intgetOpcode()intgetOperand()voidsetOpcode(int opcode)voidsetOperand(int operand)StringtoString()voidwrite(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)
-
-
-
Constructor Detail
-
MIntInsn
public MIntInsn()
Конструктор по умолчанию
-
MIntInsn
public MIntInsn(int op, int operand)
-
MIntInsn
public MIntInsn(MIntInsn sample)
Конструктор копирования- Parameters:
sample- образец
-
-
Method Detail
-
clone
public MIntInsn clone()
- Specified by:
clonein interfaceMethodByteCode- Specified by:
clonein classMAbstractBC
-
getOpcode
public int getOpcode()
-
setOpcode
public void setOpcode(int opcode)
-
getOperand
public int getOperand()
-
setOperand
public void setOperand(int operand)
-
write
public void write(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)- Specified by:
writein interfaceMethodWriter
-
-