}
else
{
index= bytes.readUnsignedShort();
}
Constant constant= constantPool.getConstant(index);
if (opcode == Const.LDC2_W && (constant.getTag() != Constants.CONSTANT_Double && constant.getTag() != Constants.CONSTANT_Long))
throw new RuntimeException("LDC2_W must load long or double");
if (constant.getTag() == Constants.CONSTANT_Integer)
{
instruction= NumberLiteral.create(new Integer(((ConstantInteger) constant).getBytes()));
}
else if (constant.getTag() == Constants.CONSTANT_Float)
{
instruction= NumberLiteral.create(new Float(((ConstantFloat) constant).getBytes()));
}
else if (constant.getTag() == Constants.CONSTANT_Long)
{
instruction= NumberLiteral.create(new Long(((ConstantLong) constant).getBytes()));
}
else if (constant.getTag() == Constants.CONSTANT_Double)
{
instruction= NumberLiteral.create(new Double(((ConstantDouble) constant).getBytes()));
}
else if (constant.getTag() == Constants.CONSTANT_Utf8)
{
instruction= new StringLiteral(((ConstantUtf8) constant).getBytes());
}
else if (constant.getTag() == Constants.CONSTANT_String)
{
int k= ((ConstantString) constant).getStringIndex();
constant= constantPool.getConstant(k, Constants.CONSTANT_Utf8);
instruction= new StringLiteral(((ConstantUtf8) constant).getBytes());
}
else if (constant.getTag() == Constants.CONSTANT_Class)
{
Signature signature= Project.getSingleton().getSignature(((ConstantClass) constant).getBytes(constantPool));
instruction= new ClassLiteral(signature);
}
else
{
throw new RuntimeException("Cannot handle constant tag: " + constant.getTag());
}
break;
}
case Const.RET: