Package xyz.cofe.trambda.bc.mth
Class MInsn
- java.lang.Object
-
- xyz.cofe.trambda.bc.mth.MAbstractBC
-
- xyz.cofe.trambda.bc.mth.MInsn
-
- All Implemented Interfaces:
Serializable,xyz.cofe.collection.ImTree<ByteCode>,xyz.cofe.collection.ImTreeWalk<ByteCode>,ByteCode,MethodByteCode,MethodWriter
public class MInsn extends MAbstractBC implements MethodWriter
Простая инструкция the opcode of the instruction to be visited. This opcode is eitherМнемоника Код Параметры Стек Описание NOP 00 [No change] perform no operation ACONST_NULL 01 → null push a null reference onto the stack ICONST_M1 02 → -1 load the int value −1 onto the stack ICONST_0 03 → 0 load the int value 0 onto the stack ICONST_1 04 → 1 load the int value 1 onto the stack ICONST_2 05 → 2 load the int value 2 onto the stack ICONST_3 06 → 3 load the int value 3 onto the stack ICONST_4 07 → 4 load the int value 4 onto the stack ICONST_5 08 → 5 load the int value 5 onto the stack LCONST_0 09 → 0L push 0L (the number zero with type long) onto the stack LCONST_1 0a → 1L push 1L (the number one with type long) onto the stack FCONST_0 0b → 0.0f push 0.0f on the stack FCONST_1 0c → 1.0f push 1.0f on the stack FCONST_2 0d → 2.0f push 2.0f on the stack DCONST_0 0e → 0.0 push 0.0 (double) on the stack DCONST_1 0f → 1.0 push 1.0 (double) on the stack IALOAD 2e arrayref, index → value load an int from an array LALOAD 2f arrayref, index → value load a long from an array FALOAD 30 arrayref, index → value load a float from an array DALOAD 31 arrayref, index → value load a double from an array AALOAD 32 arrayref, index → value load onto the stack a reference from an array BALOAD 33 arrayref, index → value load a byte or Boolean value from an array CALOAD 34 arrayref, index → value load a char from an array SALOAD 35 arrayref, index → value load short from array IASTORE 4f arrayref, index, value → store an int into an array LASTORE 50 arrayref, index, value → store a long to an array FASTORE 51 arrayref, index, value → store a float in an array DASTORE 52 arrayref, index, value → store a double into an array AASTORE 53 arrayref, index, value → store a reference in an array BASTORE 54 arrayref, index, value → store a byte or Boolean value into an array CASTORE 55 arrayref, index, value → store a char into an array SASTORE 56 arrayref, index, value → store short to array POP 57 value → discard the top value on the stack POP2 58 {value2, value1} → discard the top two values on the stack (or one value, if it is a double or long) DUP 59 value → value, value duplicate the value on top of the stack DUP_X1 5a value2, value1 → value1, value2, value1 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 5b value3, value2, value1 → value1, value3, value2, value1 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 5c {value2, value1} → {value2, value1}, {value2, value1} 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 5d value3, {value2, value1} → {value2, value1}, value3, {value2, value1} duplicate two words and insert beneath third word (see explanation above) DUP2_X2 5e {value4, value3}, {value2, value1} → {value2, value1}, {value4, value3}, {value2, value1} duplicate two words and insert beneath fourth word SWAP 5f value2, value1 → value1, value2 swaps two top words on the stack (note that value1 and value2 must not be double or long) IADD 60 value1, value2 → result add two ints LADD 61 value1, value2 → result add two longs FADD 62 value1, value2 → result add two floats DADD 63 value1, value2 → result add two doubles ISUB 64 value1, value2 → result int subtract LSUB 65 value1, value2 → result subtract two longs FSUB 66 value1, value2 → result subtract two floats DSUB 67 value1, value2 → result subtract a double from another IMUL 68 value1, value2 → result multiply two integers LMUL 69 value1, value2 → result multiply two longs FMUL 6a value1, value2 → result multiply two floats DMUL 6b value1, value2 → result multiply two doubles IDIV 6c value1, value2 → result divide two integers LDIV 6d value1, value2 → result divide two longs FDIV 6e value1, value2 → result divide two floats DDIV 6f value1, value2 → result divide two doubles IREM 70 value1, value2 → result logical int remainder LREM 71 value1, value2 → result remainder of division of two longs FREM 72 value1, value2 → result get the remainder from a division between two floats DREM 73 value1, value2 → result get the remainder from a division between two doubles INEG 74 value → result negate int LNEG 75 value → result negate a long FNEG 76 value → result negate a float DNEG 74 value → result negate a double ISHL 78 value1, value2 → result int shift left LSHL 79 value1, value2 → result bitwise shift left of a long value1 by int value2 positions ISHR 7a value1, value2 → result int arithmetic shift right LSHR 7b value1, value2 → result bitwise shift right of a long value1 by int value2 positions IUSHR 7c value1, value2 → result int logical shift right LUSHR 7d value1, value2 → result bitwise shift right of a long value1 by int value2 positions, unsigned IAND 7e value1, value2 → result perform a bitwise AND on two integers LAND 7f value1, value2 → result bitwise AND of two longs IOR 80 value1, value2 → result bitwise int OR LOR 81 value1, value2 → result bitwise OR of two longs IXOR 82 value1, value2 → result int xor LXOR 83 value1, value2 → result bitwise XOR of two longs I2L 85 value → result convert an int into a long I2F 86 value → result convert an int into a float I2D 87 value → result convert an int into a double L2I 88 value → result convert an long into a int L2F 89 value → result convert an long into a float L2D 8a value → result convert an long into a double F2I 8b value → result convert an float into a int F2L 8c value → result convert an float into a long F2D 8d value → result convert an float into a double D2I 8e value → result convert an double into a int D2L 8f value → result convert an double into a long D2F 90 value → result convert an double into a float I2B 91 value → result convert an int into a byte I2C 92 value → result convert an int into a character I2S 93 value → result convert an int into a short LCMP 94 value1, value2 → result push 0 if the two longs are the same, 1 if value1 is greater than value2, -1 otherwise FCMPL 95 value1, value2 → result compare two floats, -1 on NaN FCMPG 96 value1, value2 → result compare two floats, 1 on NaN DCMPL 97 value1, value2 → result compare two doubles, -1 on NaN DCMPG 98 value1, value2 → result compare two doubles, 1 on NaN IRETURN ac value → [empty] return an integer from a method LRETURN ad value → [empty] return a long value FRETURN ae value → [empty] return a float DRETURN af value → [empty] return a double from a method ARETURN b0 objectref → [empty] return a reference from a method RETURN b1 → [empty] return void from method ARRAYLENGTH be arrayref → length get the length of an array ATHROW bf objectref → [empty], objectref throws an error or exception (notice that the rest of the stack is cleared, leaving only a reference to the Throwable) MONITORENTER c2 objectref → enter monitor for object ("grab the lock" – start of synchronized() section) MONITOREXIT c3 objectref → exit monitor for object ("release the lock" – end of synchronized() section) - See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MInsnclone()intgetOpcode()voidsetOpcode(int opcode)StringtoString()voidwrite(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)
-
-
-
Constructor Detail
-
MInsn
public MInsn()
Конструктор по умолчанию
-
MInsn
public MInsn(int op)
-
MInsn
public MInsn(MInsn sample)
Конструктор копирования- Parameters:
sample- образец
-
-
Method Detail
-
clone
public MInsn clone()
- Specified by:
clonein interfaceMethodByteCode- Specified by:
clonein classMAbstractBC
-
getOpcode
public int getOpcode()
-
setOpcode
public void setOpcode(int opcode)
-
write
public void write(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)- Specified by:
writein interfaceMethodWriter
-
-