Methods Summary |
---|
public java.lang.String | argTypes()
return VMOp.ops[opcode()].argTypes();
|
public boolean | branches()
return opcode() == opc_ret;
|
public int | nStackArgs()
return VMOp.ops[opcode()].nStackArgs();
|
public int | nStackResults()
return VMOp.ops[opcode()].nStackResults();
|
static java.lang.String | primType(int primIndex)
switch (primIndex) {
case T_BOOLEAN:
return "boolean";//NOI18N
case T_CHAR:
return "char";//NOI18N
case T_FLOAT:
return "float";//NOI18N
case T_DOUBLE:
return "double";//NOI18N
case T_BYTE:
return "byte";//NOI18N
case T_SHORT:
return "short";//NOI18N
case T_INT:
return "int";//NOI18N
case T_LONG:
return "long";//NOI18N
default:
throw new InsnError ("Invalid primitive type(" + primIndex + ")");//NOI18N
}
|
void | print(java.io.PrintStream out, int indent)
ClassPrint.spaces(out, indent);
if (opcode() == opc_newarray)
out.println(offset() + " opc_newarray " + primType(operandValue));//NOI18N
else
out.println(offset() + " " + opName(opcode()) + " " + operandValue);//NOI18N
|
public java.lang.String | resultTypes()
return VMOp.ops[opcode()].resultTypes();
|
int | size()
switch(opcode()) {
case opc_bipush:
case opc_newarray:
/* These are always 1 byte constants */
return 2;
case opc_sipush: /* a short constant */
/* This is always a 2 byte constant */
return 3;
case opc_iload:
case opc_lload:
case opc_fload:
case opc_dload:
case opc_aload:
case opc_istore:
case opc_lstore:
case opc_fstore:
case opc_dstore:
case opc_astore:
case opc_ret:
/* These can be one or two byte constants specifying a local var.
* If a two byte constant, the constant is prefixed by a wide
* instruction */
if (operandValue < 256)
return 2;
else
return 4;
default:
throw new InsnError ("invalid instruction " + opName(opcode()) +//NOI18N
" with an integer operand");//NOI18N
}
|
int | store(byte[] buf, int index)
if (size() == 4) {
/* prefix with an opc_wide */
buf[index++] = (byte) opc_wide;
}
buf[index++] = (byte) opcode();
if (size() > 2)
buf[index++] = (byte)(operandValue >> 8);
buf[index++] = (byte)(operandValue & 0xff);
return index;
|
public int | value()
return operandValue;
|