All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.Bytecode.Op

java.lang.Object
   |
   +----harpoon.IR.Bytecode.Op

public abstract class Op
extends Object
The Op class contains constants and tables that we are likely to find useful when grokking a java bytecode stream.

Included are:

Version:
$Id: Op.java,v 1.3 1998/10/11 03:01:16 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
AttributeCode, Instr, Code

Variable Index

 o AALOAD
 o AASTORE
 o ACONST_NULL
 o ALOAD
 o ALOAD_0
 o ALOAD_1
 o ALOAD_2
 o ALOAD_3
 o ANEWARRAY
 o ANEWARRAY_QUICK
 o ARETURN
 o ARRAYLENGTH
 o ASTORE
 o ASTORE_0
 o ASTORE_1
 o ASTORE_2
 o ASTORE_3
 o ATHROW
 o BALOAD
 o BASTORE
 o BIPUSH
 o BREAKPOINT
 o CALOAD
 o CASTORE
 o CHECKCAST
 o CHECKCAST_QUICK
 o D2F
 o D2I
 o D2L
 o DADD
 o DALOAD
 o DASTORE
 o DCMPG
 o DCMPL
 o DCONST_0
 o DCONST_1
 o DDIV
 o DLOAD
 o DLOAD_0
 o DLOAD_1
 o DLOAD_2
 o DLOAD_3
 o DMUL
 o DNEG
 o DREM
 o DRETURN
 o DSTORE
 o DSTORE_0
 o DSTORE_1
 o DSTORE_2
 o DSTORE_3
 o DSUB
 o DUP
 o DUP2
 o DUP2_X1
 o DUP2_X2
 o DUP_X1
 o DUP_X2
 o F2D
 o F2I
 o F2L
 o FADD
 o FALOAD
 o FASTORE
 o FCMPG
 o FCMPL
 o FCONST_0
 o FCONST_1
 o FCONST_2
 o FDIV
 o FLOAD
 o FLOAD_0
 o FLOAD_1
 o FLOAD_2
 o FLOAD_3
 o FMUL
 o FNEG
 o FREM
 o FRETURN
 o FSTORE
 o FSTORE_0
 o FSTORE_1
 o FSTORE_2
 o FSTORE_3
 o FSUB
 o GETFIELD
 o GETFIELD2_QUICK
 o GETFIELD_QUICK
 o GETFIELD_QUICK_W
 o GETSTATIC
 o GETSTATIC2_QUICK
 o GETSTATIC_QUICK
 o GOTO
 o GOTO_W
 o I2B
 o I2C
 o I2D
 o I2F
 o I2L
 o I2S
 o IADD
 o IALOAD
 o IAND
 o IASTORE
 o ICONST_0
 o ICONST_1
 o ICONST_2
 o ICONST_3
 o ICONST_4
 o ICONST_5
 o ICONST_M1
 o IDIV
 o IF_ACMPEQ
 o IF_ACMPNE
 o IF_ICMPEQ
 o IF_ICMPGE
 o IF_ICMPGT
 o IF_ICMPLE
 o IF_ICMPLT
 o IF_ICMPNE
 o IFEQ
 o IFGE
 o IFGT
 o IFLE
 o IFLT
 o IFNE
 o IFNONNULL
 o IFNULL
 o IINC
 o ILOAD
 o ILOAD_0
 o ILOAD_1
 o ILOAD_2
 o ILOAD_3
 o IMPDEP1
 o IMPDEP2
 o IMUL
 o INEG
 o INSTANCEOF
 o INSTANCEOF_QUICK
 o INVOKEINTERFACE
 o INVOKEINTERFACE_QUICK
 o INVOKENONVIRTUAL_QUICK
 o INVOKESPECIAL
 o INVOKESTATIC
 o INVOKESTATIC_QUICK
 o INVOKESUPER_QUICK
 o INVOKEVIRTUAL
 o INVOKEVIRTUAL_QUICK
 o INVOKEVIRTUAL_QUICK_W
 o INVOKEVIRTUALOBJECT_QUICK
 o IOR
 o IREM
 o IRETURN
 o ISHL
 o ISHR
 o ISTORE
 o ISTORE_0
 o ISTORE_1
 o ISTORE_2
 o ISTORE_3
 o ISUB
 o IUSHR
 o IXOR
 o JSR
 o JSR_W
 o L2D
 o L2F
 o L2I
 o LADD
 o LALOAD
 o LAND
 o LASTORE
 o LCMP
 o LCONST_0
 o LCONST_1
 o LDC
 o LDC2_W
 o LDC2_W_QUICK
 o LDC_QUICK
 o LDC_W
 o LDC_W_QUICK
 o LDIV
 o LLOAD
 o LLOAD_0
 o LLOAD_1
 o LLOAD_2
 o LLOAD_3
 o LMUL
 o LNEG
 o LOOKUPSWITCH
 o LOR
 o LREM
 o LRETURN
 o LSHL
 o LSHR
 o LSTORE
 o LSTORE_0
 o LSTORE_1
 o LSTORE_2
 o LSTORE_3
 o LSUB
 o LUSHR
 o LXOR
 o MONITORENTER
 o MONITOREXIT
 o MULTIANEWARRAY
 o MULTIANEWARRAY_QUICK
 o NEW
 o NEW_QUICK
 o NEWARRAY
 o NOP
 o POP
 o POP2
 o PUTFIELD
 o PUTFIELD2_QUICK
 o PUTFIELD_QUICK
 o PUTFIELD_QUICK_W
 o PUTSTATIC
 o PUTSTATIC2_QUICK
 o PUTSTATIC_QUICK
 o RET
 o RETURN
 o SALOAD
 o SASTORE
 o SIPUSH
 o SWAP
 o TABLESWITCH
 o UNKNOWN_DC
 o UNKNOWN_E5
 o UNKNOWN_E6
 o UNKNOWN_E7
 o UNKNOWN_E8
 o UNKNOWN_E9
 o UNKNOWN_EA
 o UNKNOWN_EB
 o UNKNOWN_EC
 o UNKNOWN_ED
 o UNKNOWN_EE
 o UNKNOWN_EF
 o UNKNOWN_F0
 o UNKNOWN_F1
 o UNKNOWN_F2
 o UNKNOWN_F3
 o UNKNOWN_F4
 o UNKNOWN_F5
 o UNKNOWN_F6
 o UNKNOWN_F7
 o UNKNOWN_F8
 o UNKNOWN_F9
 o UNKNOWN_FA
 o UNKNOWN_FB
 o UNKNOWN_FC
 o UNKNOWN_FD
 o WIDE
 o XXXUNUSEDXXX

Constructor Index

 o Op()

Method Index

 o branchTargets(byte[], int)
Computes all possible targets for a branch instruction.
 o instrSize(byte[], int)
Gives the length of the instruction at the specified offset in a bytecode array.
 o isBranch(byte)
Tells whether a given opcode is a branch instruction.
 o isJSR(byte)
Tells whether a given opcode is a jump to subrouting (JSR) instruction.
 o isUnconditionalBranch(byte)
Tells whether a given opcode is an unconditional branch instruction.
 o toString(byte)
Get the human-readable name of a given opcode.

Variables

 o NOP
 public static final byte NOP
 o ACONST_NULL
 public static final byte ACONST_NULL
 o ICONST_M1
 public static final byte ICONST_M1
 o ICONST_0
 public static final byte ICONST_0
 o ICONST_1
 public static final byte ICONST_1
 o ICONST_2
 public static final byte ICONST_2
 o ICONST_3
 public static final byte ICONST_3
 o ICONST_4
 public static final byte ICONST_4
 o ICONST_5
 public static final byte ICONST_5
 o LCONST_0
 public static final byte LCONST_0
 o LCONST_1
 public static final byte LCONST_1
 o FCONST_0
 public static final byte FCONST_0
 o FCONST_1
 public static final byte FCONST_1
 o FCONST_2
 public static final byte FCONST_2
 o DCONST_0
 public static final byte DCONST_0
 o DCONST_1
 public static final byte DCONST_1
 o BIPUSH
 public static final byte BIPUSH
 o SIPUSH
 public static final byte SIPUSH
 o LDC
 public static final byte LDC
 o LDC_W
 public static final byte LDC_W
 o LDC2_W
 public static final byte LDC2_W
 o ILOAD
 public static final byte ILOAD
 o LLOAD
 public static final byte LLOAD
 o FLOAD
 public static final byte FLOAD
 o DLOAD
 public static final byte DLOAD
 o ALOAD
 public static final byte ALOAD
 o ILOAD_0
 public static final byte ILOAD_0
 o ILOAD_1
 public static final byte ILOAD_1
 o ILOAD_2
 public static final byte ILOAD_2
 o ILOAD_3
 public static final byte ILOAD_3
 o LLOAD_0
 public static final byte LLOAD_0
 o LLOAD_1
 public static final byte LLOAD_1
 o LLOAD_2
 public static final byte LLOAD_2
 o LLOAD_3
 public static final byte LLOAD_3
 o FLOAD_0
 public static final byte FLOAD_0
 o FLOAD_1
 public static final byte FLOAD_1
 o FLOAD_2
 public static final byte FLOAD_2
 o FLOAD_3
 public static final byte FLOAD_3
 o DLOAD_0
 public static final byte DLOAD_0
 o DLOAD_1
 public static final byte DLOAD_1
 o DLOAD_2
 public static final byte DLOAD_2
 o DLOAD_3
 public static final byte DLOAD_3
 o ALOAD_0
 public static final byte ALOAD_0
 o ALOAD_1
 public static final byte ALOAD_1
 o ALOAD_2
 public static final byte ALOAD_2
 o ALOAD_3
 public static final byte ALOAD_3
 o IALOAD
 public static final byte IALOAD
 o LALOAD
 public static final byte LALOAD
 o FALOAD
 public static final byte FALOAD
 o DALOAD
 public static final byte DALOAD
 o AALOAD
 public static final byte AALOAD
 o BALOAD
 public static final byte BALOAD
 o CALOAD
 public static final byte CALOAD
 o SALOAD
 public static final byte SALOAD
 o ISTORE
 public static final byte ISTORE
 o LSTORE
 public static final byte LSTORE
 o FSTORE
 public static final byte FSTORE
 o DSTORE
 public static final byte DSTORE
 o ASTORE
 public static final byte ASTORE
 o ISTORE_0
 public static final byte ISTORE_0
 o ISTORE_1
 public static final byte ISTORE_1
 o ISTORE_2
 public static final byte ISTORE_2
 o ISTORE_3
 public static final byte ISTORE_3
 o LSTORE_0
 public static final byte LSTORE_0
 o LSTORE_1
 public static final byte LSTORE_1
 o LSTORE_2
 public static final byte LSTORE_2
 o LSTORE_3
 public static final byte LSTORE_3
 o FSTORE_0
 public static final byte FSTORE_0
 o FSTORE_1
 public static final byte FSTORE_1
 o FSTORE_2
 public static final byte FSTORE_2
 o FSTORE_3
 public static final byte FSTORE_3
 o DSTORE_0
 public static final byte DSTORE_0
 o DSTORE_1
 public static final byte DSTORE_1
 o DSTORE_2
 public static final byte DSTORE_2
 o DSTORE_3
 public static final byte DSTORE_3
 o ASTORE_0
 public static final byte ASTORE_0
 o ASTORE_1
 public static final byte ASTORE_1
 o ASTORE_2
 public static final byte ASTORE_2
 o ASTORE_3
 public static final byte ASTORE_3
 o IASTORE
 public static final byte IASTORE
 o LASTORE
 public static final byte LASTORE
 o FASTORE
 public static final byte FASTORE
 o DASTORE
 public static final byte DASTORE
 o AASTORE
 public static final byte AASTORE
 o BASTORE
 public static final byte BASTORE
 o CASTORE
 public static final byte CASTORE
 o SASTORE
 public static final byte SASTORE
 o POP
 public static final byte POP
 o POP2
 public static final byte POP2
 o DUP
 public static final byte DUP
 o DUP_X1
 public static final byte DUP_X1
 o DUP_X2
 public static final byte DUP_X2
 o DUP2
 public static final byte DUP2
 o DUP2_X1
 public static final byte DUP2_X1
 o DUP2_X2
 public static final byte DUP2_X2
 o SWAP
 public static final byte SWAP
 o IADD
 public static final byte IADD
 o LADD
 public static final byte LADD
 o FADD
 public static final byte FADD
 o DADD
 public static final byte DADD
 o ISUB
 public static final byte ISUB
 o LSUB
 public static final byte LSUB
 o FSUB
 public static final byte FSUB
 o DSUB
 public static final byte DSUB
 o IMUL
 public static final byte IMUL
 o LMUL
 public static final byte LMUL
 o FMUL
 public static final byte FMUL
 o DMUL
 public static final byte DMUL
 o IDIV
 public static final byte IDIV
 o LDIV
 public static final byte LDIV
 o FDIV
 public static final byte FDIV
 o DDIV
 public static final byte DDIV
 o IREM
 public static final byte IREM
 o LREM
 public static final byte LREM
 o FREM
 public static final byte FREM
 o DREM
 public static final byte DREM
 o INEG
 public static final byte INEG
 o LNEG
 public static final byte LNEG
 o FNEG
 public static final byte FNEG
 o DNEG
 public static final byte DNEG
 o ISHL
 public static final byte ISHL
 o LSHL
 public static final byte LSHL
 o ISHR
 public static final byte ISHR
 o LSHR
 public static final byte LSHR
 o IUSHR
 public static final byte IUSHR
 o LUSHR
 public static final byte LUSHR
 o IAND
 public static final byte IAND
 o LAND
 public static final byte LAND
 o IOR
 public static final byte IOR
 o LOR
 public static final byte LOR
 o IXOR
 public static final byte IXOR
 o LXOR
 public static final byte LXOR
 o IINC
 public static final byte IINC
 o I2L
 public static final byte I2L
 o I2F
 public static final byte I2F
 o I2D
 public static final byte I2D
 o L2I
 public static final byte L2I
 o L2F
 public static final byte L2F
 o L2D
 public static final byte L2D
 o F2I
 public static final byte F2I
 o F2L
 public static final byte F2L
 o F2D
 public static final byte F2D
 o D2I
 public static final byte D2I
 o D2L
 public static final byte D2L
 o D2F
 public static final byte D2F
 o I2B
 public static final byte I2B
 o I2C
 public static final byte I2C
 o I2S
 public static final byte I2S
 o LCMP
 public static final byte LCMP
 o FCMPL
 public static final byte FCMPL
 o FCMPG
 public static final byte FCMPG
 o DCMPL
 public static final byte DCMPL
 o DCMPG
 public static final byte DCMPG
 o IFEQ
 public static final byte IFEQ
 o IFNE
 public static final byte IFNE
 o IFLT
 public static final byte IFLT
 o IFGE
 public static final byte IFGE
 o IFGT
 public static final byte IFGT
 o IFLE
 public static final byte IFLE
 o IF_ICMPEQ
 public static final byte IF_ICMPEQ
 o IF_ICMPNE
 public static final byte IF_ICMPNE
 o IF_ICMPLT
 public static final byte IF_ICMPLT
 o IF_ICMPGE
 public static final byte IF_ICMPGE
 o IF_ICMPGT
 public static final byte IF_ICMPGT
 o IF_ICMPLE
 public static final byte IF_ICMPLE
 o IF_ACMPEQ
 public static final byte IF_ACMPEQ
 o IF_ACMPNE
 public static final byte IF_ACMPNE
 o GOTO
 public static final byte GOTO
 o JSR
 public static final byte JSR
 o RET
 public static final byte RET
 o TABLESWITCH
 public static final byte TABLESWITCH
 o LOOKUPSWITCH
 public static final byte LOOKUPSWITCH
 o IRETURN
 public static final byte IRETURN
 o LRETURN
 public static final byte LRETURN
 o FRETURN
 public static final byte FRETURN
 o DRETURN
 public static final byte DRETURN
 o ARETURN
 public static final byte ARETURN
 o RETURN
 public static final byte RETURN
 o GETSTATIC
 public static final byte GETSTATIC
 o PUTSTATIC
 public static final byte PUTSTATIC
 o GETFIELD
 public static final byte GETFIELD
 o PUTFIELD
 public static final byte PUTFIELD
 o INVOKEVIRTUAL
 public static final byte INVOKEVIRTUAL
 o INVOKESPECIAL
 public static final byte INVOKESPECIAL
 o INVOKESTATIC
 public static final byte INVOKESTATIC
 o INVOKEINTERFACE
 public static final byte INVOKEINTERFACE
 o XXXUNUSEDXXX
 public static final byte XXXUNUSEDXXX
 o NEW
 public static final byte NEW
 o NEWARRAY
 public static final byte NEWARRAY
 o ANEWARRAY
 public static final byte ANEWARRAY
 o ARRAYLENGTH
 public static final byte ARRAYLENGTH
 o ATHROW
 public static final byte ATHROW
 o CHECKCAST
 public static final byte CHECKCAST
 o INSTANCEOF
 public static final byte INSTANCEOF
 o MONITORENTER
 public static final byte MONITORENTER
 o MONITOREXIT
 public static final byte MONITOREXIT
 o WIDE
 public static final byte WIDE
 o MULTIANEWARRAY
 public static final byte MULTIANEWARRAY
 o IFNULL
 public static final byte IFNULL
 o IFNONNULL
 public static final byte IFNONNULL
 o GOTO_W
 public static final byte GOTO_W
 o JSR_W
 public static final byte JSR_W
 o BREAKPOINT
 public static final byte BREAKPOINT
 o LDC_QUICK
 public static final byte LDC_QUICK
 o LDC_W_QUICK
 public static final byte LDC_W_QUICK
 o LDC2_W_QUICK
 public static final byte LDC2_W_QUICK
 o GETFIELD_QUICK
 public static final byte GETFIELD_QUICK
 o PUTFIELD_QUICK
 public static final byte PUTFIELD_QUICK
 o GETFIELD2_QUICK
 public static final byte GETFIELD2_QUICK
 o PUTFIELD2_QUICK
 public static final byte PUTFIELD2_QUICK
 o GETSTATIC_QUICK
 public static final byte GETSTATIC_QUICK
 o PUTSTATIC_QUICK
 public static final byte PUTSTATIC_QUICK
 o GETSTATIC2_QUICK
 public static final byte GETSTATIC2_QUICK
 o PUTSTATIC2_QUICK
 public static final byte PUTSTATIC2_QUICK
 o INVOKEVIRTUAL_QUICK
 public static final byte INVOKEVIRTUAL_QUICK
 o INVOKENONVIRTUAL_QUICK
 public static final byte INVOKENONVIRTUAL_QUICK
 o INVOKESUPER_QUICK
 public static final byte INVOKESUPER_QUICK
 o INVOKESTATIC_QUICK
 public static final byte INVOKESTATIC_QUICK
 o INVOKEINTERFACE_QUICK
 public static final byte INVOKEINTERFACE_QUICK
 o INVOKEVIRTUALOBJECT_QUICK
 public static final byte INVOKEVIRTUALOBJECT_QUICK
 o UNKNOWN_DC
 public static final byte UNKNOWN_DC
 o NEW_QUICK
 public static final byte NEW_QUICK
 o ANEWARRAY_QUICK
 public static final byte ANEWARRAY_QUICK
 o MULTIANEWARRAY_QUICK
 public static final byte MULTIANEWARRAY_QUICK
 o CHECKCAST_QUICK
 public static final byte CHECKCAST_QUICK
 o INSTANCEOF_QUICK
 public static final byte INSTANCEOF_QUICK
 o INVOKEVIRTUAL_QUICK_W
 public static final byte INVOKEVIRTUAL_QUICK_W
 o GETFIELD_QUICK_W
 public static final byte GETFIELD_QUICK_W
 o PUTFIELD_QUICK_W
 public static final byte PUTFIELD_QUICK_W
 o UNKNOWN_E5
 public static final byte UNKNOWN_E5
 o UNKNOWN_E6
 public static final byte UNKNOWN_E6
 o UNKNOWN_E7
 public static final byte UNKNOWN_E7
 o UNKNOWN_E8
 public static final byte UNKNOWN_E8
 o UNKNOWN_E9
 public static final byte UNKNOWN_E9
 o UNKNOWN_EA
 public static final byte UNKNOWN_EA
 o UNKNOWN_EB
 public static final byte UNKNOWN_EB
 o UNKNOWN_EC
 public static final byte UNKNOWN_EC
 o UNKNOWN_ED
 public static final byte UNKNOWN_ED
 o UNKNOWN_EE
 public static final byte UNKNOWN_EE
 o UNKNOWN_EF
 public static final byte UNKNOWN_EF
 o UNKNOWN_F0
 public static final byte UNKNOWN_F0
 o UNKNOWN_F1
 public static final byte UNKNOWN_F1
 o UNKNOWN_F2
 public static final byte UNKNOWN_F2
 o UNKNOWN_F3
 public static final byte UNKNOWN_F3
 o UNKNOWN_F4
 public static final byte UNKNOWN_F4
 o UNKNOWN_F5
 public static final byte UNKNOWN_F5
 o UNKNOWN_F6
 public static final byte UNKNOWN_F6
 o UNKNOWN_F7
 public static final byte UNKNOWN_F7
 o UNKNOWN_F8
 public static final byte UNKNOWN_F8
 o UNKNOWN_F9
 public static final byte UNKNOWN_F9
 o UNKNOWN_FA
 public static final byte UNKNOWN_FA
 o UNKNOWN_FB
 public static final byte UNKNOWN_FB
 o UNKNOWN_FC
 public static final byte UNKNOWN_FC
 o UNKNOWN_FD
 public static final byte UNKNOWN_FD
 o IMPDEP1
 public static final byte IMPDEP1
 o IMPDEP2
 public static final byte IMPDEP2

Constructors

 o Op
 public Op()

Methods

 o toString
 public static final String toString(byte opcode)
Get the human-readable name of a given opcode.

 o instrSize
 public static final int instrSize(byte code[],
                                   int pc)
Gives the length of the instruction at the specified offset in a bytecode array.

The length is the number of operand bytes plus 1 byte for the opcode.

Parameters:
code - the bytecode array.
pc - the offset into the array where the opcode of interest is located.
Returns:
the length of the opcode and operands.
 o isBranch
 public static final boolean isBranch(byte opcode)
Tells whether a given opcode is a branch instruction.

Parameters:
opcode - the opcode to check.
Returns:
true if the opcode is a branch instruction.
 o isUnconditionalBranch
 public static final boolean isUnconditionalBranch(byte opcode)
Tells whether a given opcode is an unconditional branch instruction.

Parameters:
opcode - the opcode to check.
Returns:
true if the opcode is an unconditional branch instruction.
 o isJSR
 public static final boolean isJSR(byte opcode)
Tells whether a given opcode is a jump to subrouting (JSR) instruction.

Parameters:
opcode - the opcode to check.
Returns:
true if the opcode is a JSR or JSR_W instruction.
 o branchTargets
 public static final int[] branchTargets(byte code[],
                                         int pc)
Computes all possible targets for a branch instruction.

Parameters:
code - the bytecode array.
pc - the offset into the bytecode array at which the desired instruction is found.
Returns:
an array of all possible targets, in the same format as pc. (ie, offsets from the start of the bytecode array.)
Throws: Error
if the opcode is not a branch instruction.

All Packages  Class Hierarchy  This Package  Previous  Next  Index