|
|||||||||
| Home >> All >> com >> chaoswg >> xtc4y >> classdesc >> code >> [ instructions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.chaoswg.xtc4y.classdesc.code.instructions
Class BinaryInstruction

java.lang.Objectcom.chaoswg.xtc4y.classdesc.code.instructions.Instruction
com.chaoswg.xtc4y.classdesc.code.instructions.BinaryInstruction
- Direct Known Subclasses:
- ShortCPRefInstruction
- public class BinaryInstruction
- extends Instruction
A binary instruction consists of a command and one one byte operand, therefore its size is 2 bytes
| Field Summary | |
static byte |
ALOAD
Load a local object variable by index |
static byte |
ASTORE
store a local object variable at index |
static byte |
BIPUSH
push a byte onto the stack |
static byte |
DLOAD
Load a local double variable by index |
static byte |
DSTORE
store a local double variable at index |
static byte |
FLOAD
Load a local float variable by index |
static byte |
FSTORE
store a local float variable at index |
static byte |
ILOAD
Load a local int variable by index |
static byte |
ISTORE
store a local int variable at index |
static byte |
LLOAD
Load a local long variable by index |
static byte |
LSTORE
store a local long variable at index |
private byte |
operand
|
static byte |
RET
Return from a subroutine call reading the return address from the loca variable |
| Fields inherited from class com.chaoswg.xtc4y.classdesc.code.instructions.Instruction |
|
| Constructor Summary | |
|
BinaryInstruction(byte command)
Create a new binary instruction with a command and the byte value as operand |
protected |
BinaryInstruction(byte command,
java.io.DataInputStream dis,
com.chaoswg.xtc4y.classdesc.ConstantPool cp)
Creates an BinaryInstruction and initializes it from a DataInputStream. |
| Method Summary | |
int |
getNumberOfUsedBytes()
|
protected byte |
getOperand(com.chaoswg.xtc4y.classdesc.ConstantPool cp)
|
protected void |
handleOperand(byte operand,
com.chaoswg.xtc4y.classdesc.ConstantPool cp)
Handle operand. |
java.lang.String |
toString()
Write code in a readable way |
void |
write(java.io.DataOutputStream dos,
com.chaoswg.xtc4y.classdesc.ConstantPool cp)
Write the instruction onto the DataOutputStream, using the constant pool to register variables. |
| Methods inherited from class com.chaoswg.xtc4y.classdesc.code.instructions.Instruction |
getCommand, getIndex, getOpcode, resolveIndices, setIndex |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
operand
private byte operand
BIPUSH
public static final byte BIPUSH
- push a byte onto the stack
- See Also:
- Constant Field Values
ILOAD
public static final byte ILOAD
- Load a local int variable by index
- See Also:
- Constant Field Values
LLOAD
public static final byte LLOAD
- Load a local long variable by index
- See Also:
- Constant Field Values
FLOAD
public static final byte FLOAD
- Load a local float variable by index
- See Also:
- Constant Field Values
DLOAD
public static final byte DLOAD
- Load a local double variable by index
- See Also:
- Constant Field Values
ALOAD
public static final byte ALOAD
- Load a local object variable by index
- See Also:
- Constant Field Values
ISTORE
public static final byte ISTORE
- store a local int variable at index
- See Also:
- Constant Field Values
LSTORE
public static final byte LSTORE
- store a local long variable at index
- See Also:
- Constant Field Values
FSTORE
public static final byte FSTORE
- store a local float variable at index
- See Also:
- Constant Field Values
DSTORE
public static final byte DSTORE
- store a local double variable at index
- See Also:
- Constant Field Values
ASTORE
public static final byte ASTORE
- store a local object variable at index
- See Also:
- Constant Field Values
RET
public static final byte RET
- Return from a subroutine call reading the return address from the loca
variable
- See Also:
- Constant Field Values
| Constructor Detail |
BinaryInstruction
protected BinaryInstruction(byte command,
java.io.DataInputStream dis,
com.chaoswg.xtc4y.classdesc.ConstantPool cp)
throws java.io.IOException
- Creates an BinaryInstruction and initializes it from a
DataInputStream. the operand is read from the stream and
provided to extending classes for a further handling of it
BinaryInstruction
public BinaryInstruction(byte command)
- Create a new binary instruction with a command and the byte value
as operand
| Method Detail |
handleOperand
protected void handleOperand(byte operand,
com.chaoswg.xtc4y.classdesc.ConstantPool cp)
- Handle operand. By default, the operands value is stored. Another
behaviour may be implemented in an extending class
write
public final void write(java.io.DataOutputStream dos, com.chaoswg.xtc4y.classdesc.ConstantPool cp) throws java.io.IOException
- Write the instruction onto the DataOutputStream, using the
constant pool to register variables. .
- Overrides:
writein classInstruction
getOperand
protected byte getOperand(com.chaoswg.xtc4y.classdesc.ConstantPool cp)
getNumberOfUsedBytes
public final int getNumberOfUsedBytes()
- Specified by:
getNumberOfUsedBytesin classInstruction
toString
public java.lang.String toString()
- Write code in a readable way
- Overrides:
toStringin classInstruction
|
|||||||||
| Home >> All >> com >> chaoswg >> xtc4y >> classdesc >> code >> [ instructions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC