switch(opcode) {
case Constants.IRETURN: return Type.INT;
case Constants.LRETURN: return Type.LONG;
case Constants.FRETURN: return Type.FLOAT;
case Constants.DRETURN: return Type.DOUBLE;
case Constants.ARETURN: return Type.OBJECT;
case Constants.RETURN: return Type.VOID;
default: // Never reached
throw new ClassGenException("Unknown type " + opcode);
}