if (opcode == 0x12) {
cpIdx = getu1();
} else {
cpIdx = getu2();
}
final VmConstObject o = (VmConstObject) cp.getAny(cpIdx);
switch (o.getConstType()) {
case VmConstObject.CONST_INT:
handler.visit_iconst(((VmConstInt) o).intValue());
break;
case VmConstObject.CONST_FLOAT:
handler.visit_fconst(((VmConstFloat) o).floatValue());
break;
case VmConstObject.CONST_CLASS:
handler.visit_ldc((VmConstClass) o);
break;
case VmConstObject.CONST_STRING:
handler.visit_ldc((VmConstString) o);
break;
default:
throw new ClassFormatError("Unknown constant pool type: " + o.getConstType());
}
break;
}
// -- 20 --
case 0x14: {
final VmConstObject o = (VmConstObject) cp.getAny(getu2());
switch (o.getConstType()) {
case VmConstObject.CONST_LONG:
handler.visit_lconst(((VmConstLong) o).longValue());
break;
case VmConstObject.CONST_DOUBLE:
handler.visit_dconst(((VmConstDouble) o).doubleValue());
break;
default:
throw new ClassFormatError("Unknown constant pool type: " + o.getConstType());
}
break;
}
case 0x15:
handler.visit_iload(getu1());