/** {@inheritDoc} */
public void visitThrowingCstInsn(ThrowingCstInsn insn) {
SourcePosition pos = insn.getPosition();
Dop opcode = RopToDop.dopFor(insn);
Rop rop = insn.getOpcode();
Constant cst = insn.getConstant();
if (rop.getBranchingness() != Rop.BRANCH_THROW) {
throw new RuntimeException("shouldn't happen");
}
addOutput(lastAddress);
if (rop.isCallLike()) {
RegisterSpecList regs = insn.getSources();
DalvInsn di = new CstInsn(opcode, pos, regs, cst);
addOutput(di);
} else {
RegisterSpec realResult = getNextMoveResultPseudo();
RegisterSpecList regs = getRegs(insn, realResult);
DalvInsn di;
boolean hasResult = opcode.hasResult()
|| (rop.getOpcode() == RegOps.CHECK_CAST);
if (hasResult != (realResult != null)) {
throw new RuntimeException(
"Insn with result/move-result-pseudo mismatch " +
insn);
}
if ((rop.getOpcode() == RegOps.NEW_ARRAY) &&
(opcode.getOpcode() != Opcodes.NEW_ARRAY)) {
/*
* It's a type-specific new-array-<primitive>, and
* so it should be turned into a SimpleInsn (no
* constant ref as it's implicit).