byucc.jhdl.synth.classparse
Class OpCode

java.lang.Object
  extended bybyucc.jhdl.synth.classparse.ClassFileParser
      extended bybyucc.jhdl.synth.classparse.OpCode
Direct Known Subclasses:
OpCodeBranch, OpCodeByte, OpCodeByteCP, OpCodeIinc, OpCodeMultianewarray, OpCodeShort, OpCodeWide, SynthOpCode

public class OpCode
extends ClassFileParser


Field Summary
protected static OpCode[] codes
           
protected  java.lang.String mnemonic
           
static int OP_AALOAD
           
static int OP_AASTORE
           
static int OP_ACONST_NULL
           
static int OP_ALOAD
           
static int OP_ALOAD_0
           
static int OP_ALOAD_1
           
static int OP_ALOAD_2
           
static int OP_ALOAD_3
           
static int OP_ANEWARRAY
           
static int OP_ARETURN
           
static int OP_ARRAYLENGTH
           
static int OP_ASTORE
           
static int OP_ASTORE_0
           
static int OP_ASTORE_1
           
static int OP_ASTORE_2
           
static int OP_ASTORE_3
           
static int OP_ATHROW
           
static int OP_BALOAD
           
static int OP_BASTORE
           
static int OP_BIPUSH
           
static int OP_CALOAD
           
static int OP_CASTORE
           
static int OP_CHECKCAST
           
protected  int op_code
           
static int OP_D2F
           
static int OP_D2I
           
static int OP_D2L
           
static int OP_DADD
           
static int OP_DALOAD
           
static int OP_DASTORE
           
static int OP_DCMPG
           
static int OP_DCMPL
           
static int OP_DCONST_0
           
static int OP_DCONST_1
           
static int OP_DDIV
           
static int OP_DLOAD
           
static int OP_DLOAD_0
           
static int OP_DLOAD_1
           
static int OP_DLOAD_2
           
static int OP_DLOAD_3
           
static int OP_DMUL
           
static int OP_DNEG
           
static int OP_DREM
           
static int OP_DRETURN
           
static int OP_DSTORE
           
static int OP_DSTORE_0
           
static int OP_DSTORE_1
           
static int OP_DSTORE_2
           
static int OP_DSTORE_3
           
static int OP_DSUB
           
static int OP_DUP
           
static int OP_DUP_X1
           
static int OP_DUP_X2
           
static int OP_DUP2
           
static int OP_DUP2_X1
           
static int OP_DUP2_X2
           
static int OP_F2D
           
static int OP_F2I
           
static int OP_F2L
           
static int OP_FADD
           
static int OP_FALOAD
           
static int OP_FASTORE
           
static int OP_FCMPG
           
static int OP_FCMPL
           
static int OP_FCONST_0
           
static int OP_FCONST_1
           
static int OP_FCONST_2
           
static int OP_FDIV
           
static int OP_FLOAD
           
static int OP_FLOAD_0
           
static int OP_FLOAD_1
           
static int OP_FLOAD_2
           
static int OP_FLOAD_3
           
static int OP_FMUL
           
static int OP_FNEG
           
static int OP_FREM
           
static int OP_FRETURN
           
static int OP_FSTORE
           
static int OP_FSTORE_0
           
static int OP_FSTORE_1
           
static int OP_FSTORE_2
           
static int OP_FSTORE_3
           
static int OP_FSUB
           
static int OP_GETFIELD
           
static int OP_GETSTATIC
           
static int OP_GOTO
           
static int OP_GOTO_W
           
static int OP_I2B
           
static int OP_I2C
           
static int OP_I2D
           
static int OP_I2F
           
static int OP_I2L
           
static int OP_I2S
           
static int OP_IADD
           
static int OP_IALOAD
           
static int OP_IAND
           
static int OP_IASTORE
           
static int OP_ICONST_0
           
static int OP_ICONST_1
           
static int OP_ICONST_2
           
static int OP_ICONST_3
           
static int OP_ICONST_4
           
static int OP_ICONST_5
           
static int OP_ICONST_M1
           
static int OP_IDIV
           
static int OP_IF_ACMPEQ
           
static int OP_IF_ACMPNE
           
static int OP_IF_ICMPEQ
           
static int OP_IF_ICMPGE
           
static int OP_IF_ICMPGT
           
static int OP_IF_ICMPLE
           
static int OP_IF_ICMPLT
           
static int OP_IF_ICMPNE
           
static int OP_IFEQ
           
static int OP_IFGE
           
static int OP_IFGT
           
static int OP_IFLE
           
static int OP_IFLT
           
static int OP_IFNE
           
static int OP_IFNONNULL
           
static int OP_IFNULL
           
static int OP_IINC
           
static int OP_ILOAD
           
static int OP_ILOAD_0
           
static int OP_ILOAD_1
           
static int OP_ILOAD_2
           
static int OP_ILOAD_3
           
static int OP_IMUL
           
static int OP_INEG
           
static int OP_INSTANCEOF
           
static int OP_INVOKEINTERFACE
           
static int OP_INVOKENONVIRTUAL
           
static int OP_INVOKESTATIC
           
static int OP_INVOKEVIRTUAL
           
static int OP_IOR
           
static int OP_IREM
           
static int OP_IRETURN
           
static int OP_ISHL
           
static int OP_ISHR
           
static int OP_ISTORE
           
static int OP_ISTORE_0
           
static int OP_ISTORE_1
           
static int OP_ISTORE_2
           
static int OP_ISTORE_3
           
static int OP_ISUB
           
static int OP_IUSHR
           
static int OP_IXOR
           
static int OP_JSR
           
static int OP_JSR_W
           
static int OP_L2D
           
static int OP_L2F
           
static int OP_L2I
           
static int OP_LADD
           
static int OP_LALOAD
           
static int OP_LAND
           
static int OP_LASTORE
           
static int OP_LCMP
           
static int OP_LCONST_0
           
static int OP_LCONST_1
           
static int OP_LDC
           
static int OP_LDC_W
           
static int OP_LDC2_W
           
static int OP_LDIV
           
static int OP_LLOAD
           
static int OP_LLOAD_0
           
static int OP_LLOAD_1
           
static int OP_LLOAD_2
           
static int OP_LLOAD_3
           
static int OP_LMUL
           
static int OP_LNEG
           
static int OP_LOOKUPSWITCH
           
static int OP_LOR
           
static int OP_LREM
           
static int OP_LRETURN
           
static int OP_LSHL
           
static int OP_LSHR
           
static int OP_LSTORE
           
static int OP_LSTORE_0
           
static int OP_LSTORE_1
           
static int OP_LSTORE_2
           
static int OP_LSTORE_3
           
static int OP_LSUB
           
static int OP_LUSHR
           
static int OP_LXOR
           
static int OP_MONITORENTER
           
static int OP_MONITOREXIT
           
static int OP_MULTIANEWARRAY
           
static int OP_NEW
           
static int OP_NEWARRAY
           
static int OP_NOP
           
static int OP_POP
           
static int OP_POP2
           
static int OP_PUTFIELD
           
static int OP_PUTSTATIC
           
static int OP_RET
           
static int OP_RETURN
           
static int OP_SALOAD
           
static int OP_SASTORE
           
static int OP_SIPUSH
           
static int OP_SWAP
           
static int OP_TABLESWITCH
           
static int OP_UNUSED
           
static int OP_WIDE
           
protected  int pc
           
 
Fields inherited from class byucc.jhdl.synth.classparse.ClassFileParser
CONSTANT_Class, CONSTANT_Double, CONSTANT_Fieldref, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodref, CONSTANT_Long, CONSTANT_Methodref, CONSTANT_NameAndType, CONSTANT_String, CONSTANT_Utf8
 
Constructor Summary
OpCode(int pc, java.lang.String mnemonic, int op_code)
           
OpCode(java.lang.String mnemonic, int op_code)
           
 
Method Summary
 void execute(VirtualMachine vm)
           
protected  int getImmediate(java.lang.String mnemonic)
           
 int getLineNumber()
           
 java.lang.String getName()
           
 int getOpCode()
           
 int getPC()
           
 WeightedOpCode[] getPossibleTargets(AttributeCode code)
           
protected  boolean hasImmediate(java.lang.String mnemonic)
           
 boolean isConditionalBranch()
           
 boolean isControl()
          Is the current OpCode an instruction which affects control flow?
 boolean isSwitch()
           
 boolean isTarget()
           
 boolean isUnconditionalBranch()
           
 java.lang.String jasminHeader()
           
 OpCode parse(int pc, java.lang.String mnemonic, int op_code)
           
static void registerOpCodeArray(OpCode[] codes)
           
 void setTarget()
           
 void toClass(ClassFileWriter output)
          Spit out the contents of this OpCode to the given ClassFileWriter.
 java.lang.StringBuffer toJasmin(java.lang.StringBuffer result)
           
 java.lang.String toString()
           
 
Methods inherited from class byucc.jhdl.synth.classparse.ClassFileParser
getClassFile, getConstantPool, length, parseAttributeInfo, parseAttributes, parseConstantPool, parseCPInfo, parseDouble, parseFieldInfo, parseFields, parseFloat, parseLong, parseMethodInfo, parseMethods, parseOpCode, parseSuccess, parseUTF, s2, toJasmin, u1, u2, u4
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mnemonic

protected java.lang.String mnemonic

pc

protected int pc

op_code

protected int op_code

OP_NOP

public static final int OP_NOP
See Also:
Constant Field Values

OP_ACONST_NULL

public static final int OP_ACONST_NULL
See Also:
Constant Field Values

OP_ICONST_M1

public static final int OP_ICONST_M1
See Also:
Constant Field Values

OP_ICONST_0

public static final int OP_ICONST_0
See Also:
Constant Field Values

OP_ICONST_1

public static final int OP_ICONST_1
See Also:
Constant Field Values

OP_ICONST_2

public static final int OP_ICONST_2
See Also:
Constant Field Values

OP_ICONST_3

public static final int OP_ICONST_3
See Also:
Constant Field Values

OP_ICONST_4

public static final int OP_ICONST_4
See Also:
Constant Field Values

OP_ICONST_5

public static final int OP_ICONST_5
See Also:
Constant Field Values

OP_LCONST_0

public static final int OP_LCONST_0
See Also:
Constant Field Values

OP_LCONST_1

public static final int OP_LCONST_1
See Also:
Constant Field Values

OP_FCONST_0

public static final int OP_FCONST_0
See Also:
Constant Field Values

OP_FCONST_1

public static final int OP_FCONST_1
See Also:
Constant Field Values

OP_FCONST_2

public static final int OP_FCONST_2
See Also:
Constant Field Values

OP_DCONST_0

public static final int OP_DCONST_0
See Also:
Constant Field Values

OP_DCONST_1

public static final int OP_DCONST_1
See Also:
Constant Field Values

OP_BIPUSH

public static final int OP_BIPUSH
See Also:
Constant Field Values

OP_SIPUSH

public static final int OP_SIPUSH
See Also:
Constant Field Values

OP_LDC

public static final int OP_LDC
See Also:
Constant Field Values

OP_LDC_W

public static final int OP_LDC_W
See Also:
Constant Field Values

OP_LDC2_W

public static final int OP_LDC2_W
See Also:
Constant Field Values

OP_ILOAD

public static final int OP_ILOAD
See Also:
Constant Field Values

OP_LLOAD

public static final int OP_LLOAD
See Also:
Constant Field Values

OP_FLOAD

public static final int OP_FLOAD
See Also:
Constant Field Values

OP_DLOAD

public static final int OP_DLOAD
See Also:
Constant Field Values

OP_ALOAD

public static final int OP_ALOAD
See Also:
Constant Field Values

OP_ILOAD_0

public static final int OP_ILOAD_0
See Also:
Constant Field Values

OP_ILOAD_1

public static final int OP_ILOAD_1
See Also:
Constant Field Values

OP_ILOAD_2

public static final int OP_ILOAD_2
See Also:
Constant Field Values

OP_ILOAD_3

public static final int OP_ILOAD_3
See Also:
Constant Field Values

OP_LLOAD_0

public static final int OP_LLOAD_0
See Also:
Constant Field Values

OP_LLOAD_1

public static final int OP_LLOAD_1
See Also:
Constant Field Values

OP_LLOAD_2

public static final int OP_LLOAD_2
See Also:
Constant Field Values

OP_LLOAD_3

public static final int OP_LLOAD_3
See Also:
Constant Field Values

OP_FLOAD_0

public static final int OP_FLOAD_0
See Also:
Constant Field Values

OP_FLOAD_1

public static final int OP_FLOAD_1
See Also:
Constant Field Values

OP_FLOAD_2

public static final int OP_FLOAD_2
See Also:
Constant Field Values

OP_FLOAD_3

public static final int OP_FLOAD_3
See Also:
Constant Field Values

OP_DLOAD_0

public static final int OP_DLOAD_0
See Also:
Constant Field Values

OP_DLOAD_1

public static final int OP_DLOAD_1
See Also:
Constant Field Values

OP_DLOAD_2

public static final int OP_DLOAD_2
See Also:
Constant Field Values

OP_DLOAD_3

public static final int OP_DLOAD_3
See Also:
Constant Field Values

OP_ALOAD_0

public static final int OP_ALOAD_0
See Also:
Constant Field Values

OP_ALOAD_1

public static final int OP_ALOAD_1
See Also:
Constant Field Values

OP_ALOAD_2

public static final int OP_ALOAD_2
See Also:
Constant Field Values

OP_ALOAD_3

public static final int OP_ALOAD_3
See Also:
Constant Field Values

OP_IALOAD

public static final int OP_IALOAD
See Also:
Constant Field Values

OP_LALOAD

public static final int OP_LALOAD
See Also:
Constant Field Values

OP_FALOAD

public static final int OP_FALOAD
See Also:
Constant Field Values

OP_DALOAD

public static final int OP_DALOAD
See Also:
Constant Field Values

OP_AALOAD

public static final int OP_AALOAD
See Also:
Constant Field Values

OP_BALOAD

public static final int OP_BALOAD
See Also:
Constant Field Values

OP_CALOAD

public static final int OP_CALOAD
See Also:
Constant Field Values

OP_SALOAD

public static final int OP_SALOAD
See Also:
Constant Field Values

OP_ISTORE

public static final int OP_ISTORE
See Also:
Constant Field Values

OP_LSTORE

public static final int OP_LSTORE
See Also:
Constant Field Values

OP_FSTORE

public static final int OP_FSTORE
See Also:
Constant Field Values

OP_DSTORE

public static final int OP_DSTORE
See Also:
Constant Field Values

OP_ASTORE

public static final int OP_ASTORE
See Also:
Constant Field Values

OP_ISTORE_0

public static final int OP_ISTORE_0
See Also:
Constant Field Values

OP_ISTORE_1

public static final int OP_ISTORE_1
See Also:
Constant Field Values

OP_ISTORE_2

public static final int OP_ISTORE_2
See Also:
Constant Field Values

OP_ISTORE_3

public static final int OP_ISTORE_3
See Also:
Constant Field Values

OP_LSTORE_0

public static final int OP_LSTORE_0
See Also:
Constant Field Values

OP_LSTORE_1

public static final int OP_LSTORE_1
See Also:
Constant Field Values

OP_LSTORE_2

public static final int OP_LSTORE_2
See Also:
Constant Field Values

OP_LSTORE_3

public static final int OP_LSTORE_3
See Also:
Constant Field Values

OP_FSTORE_0

public static final int OP_FSTORE_0
See Also:
Constant Field Values

OP_FSTORE_1

public static final int OP_FSTORE_1
See Also:
Constant Field Values

OP_FSTORE_2

public static final int OP_FSTORE_2
See Also:
Constant Field Values

OP_FSTORE_3

public static final int OP_FSTORE_3
See Also:
Constant Field Values

OP_DSTORE_0

public static final int OP_DSTORE_0
See Also:
Constant Field Values

OP_DSTORE_1

public static final int OP_DSTORE_1
See Also:
Constant Field Values

OP_DSTORE_2

public static final int OP_DSTORE_2
See Also:
Constant Field Values

OP_DSTORE_3

public static final int OP_DSTORE_3
See Also:
Constant Field Values

OP_ASTORE_0

public static final int OP_ASTORE_0
See Also:
Constant Field Values

OP_ASTORE_1

public static final int OP_ASTORE_1
See Also:
Constant Field Values

OP_ASTORE_2

public static final int OP_ASTORE_2
See Also:
Constant Field Values

OP_ASTORE_3

public static final int OP_ASTORE_3
See Also:
Constant Field Values

OP_IASTORE

public static final int OP_IASTORE
See Also:
Constant Field Values

OP_LASTORE

public static final int OP_LASTORE
See Also:
Constant Field Values

OP_FASTORE

public static final int OP_FASTORE
See Also:
Constant Field Values

OP_DASTORE

public static final int OP_DASTORE
See Also:
Constant Field Values

OP_AASTORE

public static final int OP_AASTORE
See Also:
Constant Field Values

OP_BASTORE

public static final int OP_BASTORE
See Also:
Constant Field Values

OP_CASTORE

public static final int OP_CASTORE
See Also:
Constant Field Values

OP_SASTORE

public static final int OP_SASTORE
See Also:
Constant Field Values

OP_POP

public static final int OP_POP
See Also:
Constant Field Values

OP_POP2

public static final int OP_POP2
See Also:
Constant Field Values

OP_DUP

public static final int OP_DUP
See Also:
Constant Field Values

OP_DUP_X1

public static final int OP_DUP_X1
See Also:
Constant Field Values

OP_DUP_X2

public static final int OP_DUP_X2
See Also:
Constant Field Values

OP_DUP2

public static final int OP_DUP2
See Also:
Constant Field Values

OP_DUP2_X1

public static final int OP_DUP2_X1
See Also:
Constant Field Values

OP_DUP2_X2

public static final int OP_DUP2_X2
See Also:
Constant Field Values

OP_SWAP

public static final int OP_SWAP
See Also:
Constant Field Values

OP_IADD

public static final int OP_IADD
See Also:
Constant Field Values

OP_LADD

public static final int OP_LADD
See Also:
Constant Field Values

OP_FADD

public static final int OP_FADD
See Also:
Constant Field Values

OP_DADD

public static final int OP_DADD
See Also:
Constant Field Values

OP_ISUB

public static final int OP_ISUB
See Also:
Constant Field Values

OP_LSUB

public static final int OP_LSUB
See Also:
Constant Field Values

OP_FSUB

public static final int OP_FSUB
See Also:
Constant Field Values

OP_DSUB

public static final int OP_DSUB
See Also:
Constant Field Values

OP_IMUL

public static final int OP_IMUL
See Also:
Constant Field Values

OP_LMUL

public static final int OP_LMUL
See Also:
Constant Field Values

OP_FMUL

public static final int OP_FMUL
See Also:
Constant Field Values

OP_DMUL

public static final int OP_DMUL
See Also:
Constant Field Values

OP_IDIV

public static final int OP_IDIV
See Also:
Constant Field Values

OP_LDIV

public static final int OP_LDIV
See Also:
Constant Field Values

OP_FDIV

public static final int OP_FDIV
See Also:
Constant Field Values

OP_DDIV

public static final int OP_DDIV
See Also:
Constant Field Values

OP_IREM

public static final int OP_IREM
See Also:
Constant Field Values

OP_LREM

public static final int OP_LREM
See Also:
Constant Field Values

OP_FREM

public static final int OP_FREM
See Also:
Constant Field Values

OP_DREM

public static final int OP_DREM
See Also:
Constant Field Values

OP_INEG

public static final int OP_INEG
See Also:
Constant Field Values

OP_LNEG

public static final int OP_LNEG
See Also:
Constant Field Values

OP_FNEG

public static final int OP_FNEG
See Also:
Constant Field Values

OP_DNEG

public static final int OP_DNEG
See Also:
Constant Field Values

OP_ISHL

public static final int OP_ISHL
See Also:
Constant Field Values

OP_LSHL

public static final int OP_LSHL
See Also:
Constant Field Values

OP_ISHR

public static final int OP_ISHR
See Also:
Constant Field Values

OP_LSHR

public static final int OP_LSHR
See Also:
Constant Field Values

OP_IUSHR

public static final int OP_IUSHR
See Also:
Constant Field Values

OP_LUSHR

public static final int OP_LUSHR
See Also:
Constant Field Values

OP_IAND

public static final int OP_IAND
See Also:
Constant Field Values

OP_LAND

public static final int OP_LAND
See Also:
Constant Field Values

OP_IOR

public static final int OP_IOR
See Also:
Constant Field Values

OP_LOR

public static final int OP_LOR
See Also:
Constant Field Values

OP_IXOR

public static final int OP_IXOR
See Also:
Constant Field Values

OP_LXOR

public static final int OP_LXOR
See Also:
Constant Field Values

OP_IINC

public static final int OP_IINC
See Also:
Constant Field Values

OP_I2L

public static final int OP_I2L
See Also:
Constant Field Values

OP_I2F

public static final int OP_I2F
See Also:
Constant Field Values

OP_I2D

public static final int OP_I2D
See Also:
Constant Field Values

OP_L2I

public static final int OP_L2I
See Also:
Constant Field Values

OP_L2F

public static final int OP_L2F
See Also:
Constant Field Values

OP_L2D

public static final int OP_L2D
See Also:
Constant Field Values

OP_F2I

public static final int OP_F2I
See Also:
Constant Field Values

OP_F2L

public static final int OP_F2L
See Also:
Constant Field Values

OP_F2D

public static final int OP_F2D
See Also:
Constant Field Values

OP_D2I

public static final int OP_D2I
See Also:
Constant Field Values

OP_D2L

public static final int OP_D2L
See Also:
Constant Field Values

OP_D2F

public static final int OP_D2F
See Also:
Constant Field Values

OP_I2B

public static final int OP_I2B
See Also:
Constant Field Values

OP_I2C

public static final int OP_I2C
See Also:
Constant Field Values

OP_I2S

public static final int OP_I2S
See Also:
Constant Field Values

OP_LCMP

public static final int OP_LCMP
See Also:
Constant Field Values

OP_FCMPL

public static final int OP_FCMPL
See Also:
Constant Field Values

OP_FCMPG

public static final int OP_FCMPG
See Also:
Constant Field Values

OP_DCMPL

public static final int OP_DCMPL
See Also:
Constant Field Values

OP_DCMPG

public static final int OP_DCMPG
See Also:
Constant Field Values

OP_IFEQ

public static final int OP_IFEQ
See Also:
Constant Field Values

OP_IFNE

public static final int OP_IFNE
See Also:
Constant Field Values

OP_IFLT

public static final int OP_IFLT
See Also:
Constant Field Values

OP_IFGE

public static final int OP_IFGE
See Also:
Constant Field Values

OP_IFGT

public static final int OP_IFGT
See Also:
Constant Field Values

OP_IFLE

public static final int OP_IFLE
See Also:
Constant Field Values

OP_IF_ICMPEQ

public static final int OP_IF_ICMPEQ
See Also:
Constant Field Values

OP_IF_ICMPNE

public static final int OP_IF_ICMPNE
See Also:
Constant Field Values

OP_IF_ICMPLT

public static final int OP_IF_ICMPLT
See Also:
Constant Field Values

OP_IF_ICMPGE

public static final int OP_IF_ICMPGE
See Also:
Constant Field Values

OP_IF_ICMPGT

public static final int OP_IF_ICMPGT
See Also:
Constant Field Values

OP_IF_ICMPLE

public static final int OP_IF_ICMPLE
See Also:
Constant Field Values

OP_IF_ACMPEQ

public static final int OP_IF_ACMPEQ
See Also:
Constant Field Values

OP_IF_ACMPNE

public static final int OP_IF_ACMPNE
See Also:
Constant Field Values

OP_GOTO

public static final int OP_GOTO
See Also:
Constant Field Values

OP_JSR

public static final int OP_JSR
See Also:
Constant Field Values

OP_RET

public static final int OP_RET
See Also:
Constant Field Values

OP_TABLESWITCH

public static final int OP_TABLESWITCH
See Also:
Constant Field Values

OP_LOOKUPSWITCH

public static final int OP_LOOKUPSWITCH
See Also:
Constant Field Values

OP_IRETURN

public static final int OP_IRETURN
See Also:
Constant Field Values

OP_LRETURN

public static final int OP_LRETURN
See Also:
Constant Field Values

OP_FRETURN

public static final int OP_FRETURN
See Also:
Constant Field Values

OP_DRETURN

public static final int OP_DRETURN
See Also:
Constant Field Values

OP_ARETURN

public static final int OP_ARETURN
See Also:
Constant Field Values

OP_RETURN

public static final int OP_RETURN
See Also:
Constant Field Values

OP_GETSTATIC

public static final int OP_GETSTATIC
See Also:
Constant Field Values

OP_PUTSTATIC

public static final int OP_PUTSTATIC
See Also:
Constant Field Values

OP_GETFIELD

public static final int OP_GETFIELD
See Also:
Constant Field Values

OP_PUTFIELD

public static final int OP_PUTFIELD
See Also:
Constant Field Values

OP_INVOKEVIRTUAL

public static final int OP_INVOKEVIRTUAL
See Also:
Constant Field Values

OP_INVOKENONVIRTUAL

public static final int OP_INVOKENONVIRTUAL
See Also:
Constant Field Values

OP_INVOKESTATIC

public static final int OP_INVOKESTATIC
See Also:
Constant Field Values

OP_INVOKEINTERFACE

public static final int OP_INVOKEINTERFACE
See Also:
Constant Field Values

OP_UNUSED

public static final int OP_UNUSED
See Also:
Constant Field Values

OP_NEW

public static final int OP_NEW
See Also:
Constant Field Values

OP_NEWARRAY

public static final int OP_NEWARRAY
See Also:
Constant Field Values

OP_ANEWARRAY

public static final int OP_ANEWARRAY
See Also:
Constant Field Values

OP_ARRAYLENGTH

public static final int OP_ARRAYLENGTH
See Also:
Constant Field Values

OP_ATHROW

public static final int OP_ATHROW
See Also:
Constant Field Values

OP_CHECKCAST

public static final int OP_CHECKCAST
See Also:
Constant Field Values

OP_INSTANCEOF

public static final int OP_INSTANCEOF
See Also:
Constant Field Values

OP_MONITORENTER

public static final int OP_MONITORENTER
See Also:
Constant Field Values

OP_MONITOREXIT

public static final int OP_MONITOREXIT
See Also:
Constant Field Values

OP_WIDE

public static final int OP_WIDE
See Also:
Constant Field Values

OP_MULTIANEWARRAY

public static final int OP_MULTIANEWARRAY
See Also:
Constant Field Values

OP_IFNULL

public static final int OP_IFNULL
See Also:
Constant Field Values

OP_IFNONNULL

public static final int OP_IFNONNULL
See Also:
Constant Field Values

OP_GOTO_W

public static final int OP_GOTO_W
See Also:
Constant Field Values

OP_JSR_W

public static final int OP_JSR_W
See Also:
Constant Field Values

codes

protected static OpCode[] codes
Constructor Detail

OpCode

public OpCode(java.lang.String mnemonic,
              int op_code)

OpCode

public OpCode(int pc,
              java.lang.String mnemonic,
              int op_code)
Method Detail

toClass

public void toClass(ClassFileWriter output)
Spit out the contents of this OpCode to the given ClassFileWriter. This method is basically the opposite of the constructor. The constructor reads in a OpCode from a DataInputStream and this method spits the OpCode out to a DataOutputStream, (which is in the ClassFileWriter).

Parameters:
output - a ClassFileWriter constructed with a DataOutputStram to contain the output class file.

isControl

public boolean isControl()
Is the current OpCode an instruction which affects control flow?


isSwitch

public boolean isSwitch()

isConditionalBranch

public boolean isConditionalBranch()

isUnconditionalBranch

public boolean isUnconditionalBranch()

isTarget

public boolean isTarget()

setTarget

public void setTarget()

registerOpCodeArray

public static void registerOpCodeArray(OpCode[] codes)

getLineNumber

public int getLineNumber()

getPC

public int getPC()

getOpCode

public int getOpCode()

getName

public java.lang.String getName()

toString

public java.lang.String toString()

toJasmin

public java.lang.StringBuffer toJasmin(java.lang.StringBuffer result)
Overrides:
toJasmin in class ClassFileParser

jasminHeader

public java.lang.String jasminHeader()

parse

public OpCode parse(int pc,
                    java.lang.String mnemonic,
                    int op_code)

hasImmediate

protected boolean hasImmediate(java.lang.String mnemonic)

getImmediate

protected int getImmediate(java.lang.String mnemonic)

execute

public void execute(VirtualMachine vm)

getPossibleTargets

public WeightedOpCode[] getPossibleTargets(AttributeCode code)


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.