public void visitTypeInsn(final int opcode, final String desc) {
if (desc.length() == 1) {
throw new IllegalStateException(
"WARNING! I don't expect primitive types:" + desc);
}
final Type type = desc.contains(";") ? Type.fromDesc(desc) : Type
.fromJava(desc);
recorder.add(new Runnable() {
public void run() {
switch (opcode) {
case Opcodes.NEW :
Constant constant = new Constant("new", type);
block.addOp(new Load(lineNumber, constant));
break;
case Opcodes.NEWARRAY :
case Opcodes.ANEWARRAY :
block.addOp(new Transform(lineNumber, "newarray", Type.INT, null,
type.toArray()));
break;
case Opcodes.INSTANCEOF :
block.addOp(new Transform(lineNumber, "instanceof", Type.OBJECT,
null, Type.INT));
break;