Static Public Attributes | |
final Instruction | NOP = new NOP() |
final Instruction | ACONST_NULL = new ACONST_NULL() |
final Instruction | ICONST_M1 = new ICONST(-1) |
final Instruction | ICONST_0 = new ICONST(0) |
final Instruction | ICONST_1 = new ICONST(1) |
final Instruction | ICONST_2 = new ICONST(2) |
final Instruction | ICONST_3 = new ICONST(3) |
final Instruction | ICONST_4 = new ICONST(4) |
final Instruction | ICONST_5 = new ICONST(5) |
final Instruction | LCONST_0 = new LCONST(0) |
final Instruction | LCONST_1 = new LCONST(1) |
final Instruction | FCONST_0 = new FCONST(0) |
final Instruction | FCONST_1 = new FCONST(1) |
final Instruction | FCONST_2 = new FCONST(2) |
final Instruction | DCONST_0 = new DCONST(0) |
final Instruction | DCONST_1 = new DCONST(1) |
final ArrayInstruction | IALOAD = new IALOAD() |
final ArrayInstruction | LALOAD = new LALOAD() |
final ArrayInstruction | FALOAD = new FALOAD() |
final ArrayInstruction | DALOAD = new DALOAD() |
final ArrayInstruction | AALOAD = new AALOAD() |
final ArrayInstruction | BALOAD = new BALOAD() |
final ArrayInstruction | CALOAD = new CALOAD() |
final ArrayInstruction | SALOAD = new SALOAD() |
final ArrayInstruction | IASTORE = new IASTORE() |
final ArrayInstruction | LASTORE = new LASTORE() |
final ArrayInstruction | FASTORE = new FASTORE() |
final ArrayInstruction | DASTORE = new DASTORE() |
final ArrayInstruction | AASTORE = new AASTORE() |
final ArrayInstruction | BASTORE = new BASTORE() |
final ArrayInstruction | CASTORE = new CASTORE() |
final ArrayInstruction | SASTORE = new SASTORE() |
final StackInstruction | POP = new POP() |
final StackInstruction | POP2 = new POP2() |
final StackInstruction | DUP = new DUP() |
final StackInstruction | DUP_X1 = new DUP_X1() |
final StackInstruction | DUP_X2 = new DUP_X2() |
final StackInstruction | DUP2 = new DUP2() |
final StackInstruction | DUP2_X1 = new DUP2_X1() |
final StackInstruction | DUP2_X2 = new DUP2_X2() |
final StackInstruction | SWAP = new SWAP() |
final ArithmeticInstruction | IADD = new IADD() |
final ArithmeticInstruction | LADD = new LADD() |
final ArithmeticInstruction | FADD = new FADD() |
final ArithmeticInstruction | DADD = new DADD() |
final ArithmeticInstruction | ISUB = new ISUB() |
final ArithmeticInstruction | LSUB = new LSUB() |
final ArithmeticInstruction | FSUB = new FSUB() |
final ArithmeticInstruction | DSUB = new DSUB() |
final ArithmeticInstruction | IMUL = new IMUL() |
final ArithmeticInstruction | LMUL = new LMUL() |
final ArithmeticInstruction | FMUL = new FMUL() |
final ArithmeticInstruction | DMUL = new DMUL() |
final ArithmeticInstruction | IDIV = new IDIV() |
final ArithmeticInstruction | LDIV = new LDIV() |
final ArithmeticInstruction | FDIV = new FDIV() |
final ArithmeticInstruction | DDIV = new DDIV() |
final ArithmeticInstruction | IREM = new IREM() |
final ArithmeticInstruction | LREM = new LREM() |
final ArithmeticInstruction | FREM = new FREM() |
final ArithmeticInstruction | DREM = new DREM() |
final ArithmeticInstruction | INEG = new INEG() |
final ArithmeticInstruction | LNEG = new LNEG() |
final ArithmeticInstruction | FNEG = new FNEG() |
final ArithmeticInstruction | DNEG = new DNEG() |
final ArithmeticInstruction | ISHL = new ISHL() |
final ArithmeticInstruction | LSHL = new LSHL() |
final ArithmeticInstruction | ISHR = new ISHR() |
final ArithmeticInstruction | LSHR = new LSHR() |
final ArithmeticInstruction | IUSHR = new IUSHR() |
final ArithmeticInstruction | LUSHR = new LUSHR() |
final ArithmeticInstruction | IAND = new IAND() |
final ArithmeticInstruction | LAND = new LAND() |
final ArithmeticInstruction | IOR = new IOR() |
final ArithmeticInstruction | LOR = new LOR() |
final ArithmeticInstruction | IXOR = new IXOR() |
final ArithmeticInstruction | LXOR = new LXOR() |
final ConversionInstruction | I2L = new I2L() |
final ConversionInstruction | I2F = new I2F() |
final ConversionInstruction | I2D = new I2D() |
final ConversionInstruction | L2I = new L2I() |
final ConversionInstruction | L2F = new L2F() |
final ConversionInstruction | L2D = new L2D() |
final ConversionInstruction | F2I = new F2I() |
final ConversionInstruction | F2L = new F2L() |
final ConversionInstruction | F2D = new F2D() |
final ConversionInstruction | D2I = new D2I() |
final ConversionInstruction | D2L = new D2L() |
final ConversionInstruction | D2F = new D2F() |
final ConversionInstruction | I2B = new I2B() |
final ConversionInstruction | I2C = new I2C() |
final ConversionInstruction | I2S = new I2S() |
final Instruction | LCMP = new LCMP() |
final Instruction | FCMPL = new FCMPL() |
final Instruction | FCMPG = new FCMPG() |
final Instruction | DCMPL = new DCMPL() |
final Instruction | DCMPG = new DCMPG() |
final ReturnInstruction | IRETURN = new IRETURN() |
final ReturnInstruction | LRETURN = new LRETURN() |
final ReturnInstruction | FRETURN = new FRETURN() |
final ReturnInstruction | DRETURN = new DRETURN() |
final ReturnInstruction | ARETURN = new ARETURN() |
final ReturnInstruction | RETURN = new RETURN() |
final Instruction | ARRAYLENGTH = new ARRAYLENGTH() |
final Instruction | ATHROW = new ATHROW() |
final Instruction | MONITORENTER = new MONITORENTER() |
final Instruction | MONITOREXIT = new MONITOREXIT() |
final LocalVariableInstruction | THIS = new ALOAD(0) |
final LocalVariableInstruction | ALOAD_0 = THIS |
final LocalVariableInstruction | ALOAD_1 = new ALOAD(1) |
final LocalVariableInstruction | ALOAD_2 = new ALOAD(2) |
final LocalVariableInstruction | ILOAD_0 = new ILOAD(0) |
final LocalVariableInstruction | ILOAD_1 = new ILOAD(1) |
final LocalVariableInstruction | ILOAD_2 = new ILOAD(2) |
final LocalVariableInstruction | ASTORE_0 = new ASTORE(0) |
final LocalVariableInstruction | ASTORE_1 = new ASTORE(1) |
final LocalVariableInstruction | ASTORE_2 = new ASTORE(2) |
final LocalVariableInstruction | ISTORE_0 = new ISTORE(0) |
final LocalVariableInstruction | ISTORE_1 = new ISTORE(1) |
final LocalVariableInstruction | ISTORE_2 = new ISTORE(2) |
final Instruction[] | INSTRUCTIONS = new Instruction[256] |
final Clinit | bla = new Clinit() |
final Instruction[] | INSTRUCTIONS = new Instruction[256] |
In order to save memory you can use some instructions multiply, since they have an immutable state and are directly derived from Instruction. I.e. they have no instance fields that could be changed. Since some of these instructions like ICONST_0 occur very frequently this can save a lot of time and space. This feature is an adaptation of the FlyWeight design pattern, we just use an array instead of a factory.
The Instructions can also accessed directly under their names, so it's possible to write il.append(Instruction.ICONST_0);
Definition at line 22 of file lib/jpf/de/fub/bytecode/generic/InstructionConstants.java.
|
Get object via its opcode, for immutable instructions like branch instructions entries are set to null. Definition at line 154 of file src/de/fub/bytecode/generic/InstructionConstants.java. |
|
Get object via its opcode, for immutable instructions like branch instructions entries are set to null. Definition at line 154 of file lib/jpf/de/fub/bytecode/generic/InstructionConstants.java. |
|
Predefined instruction objects Definition at line 25 of file src/de/fub/bytecode/generic/InstructionConstants.java. |
|
You can use these constants in multiple places safely, if you can guarantee that you will never alter their internal values, e.g. call setIndex(). Definition at line 136 of file src/de/fub/bytecode/generic/InstructionConstants.java. |
|
Interfaces may have no static initializers, so we simulate this with an inner class. Definition at line 159 of file src/de/fub/bytecode/generic/InstructionConstants.java. |