private static Rop pickBinaryOp(
      TypeList types,
      Rop int1,
      Rop long1,
      Rop float1,
      Rop double1,
      Rop int2,
      Rop long2,
      Rop float2,
      Rop double2) {
    int bt1 = types.getType(0).getBasicFrameType();
    Rop result = null;

    switch (types.size()) {
      case 1:
        {
          switch (bt1) {
            case Type.BT_INT:
              return int1;
            case Type.BT_LONG:
              return long1;
            case Type.BT_FLOAT:
              result = float1;
              break;
            case Type.BT_DOUBLE:
              result = double1;
              break;
          }
          break;
        }
      case 2:
        {
          switch (bt1) {
            case Type.BT_INT:
              return int2;
            case Type.BT_LONG:
              return long2;
            case Type.BT_FLOAT:
              result = float2;
              break;
            case Type.BT_DOUBLE:
              result = double2;
              break;
          }
          break;
        }
    }

    if (result == null) {
      return throwBadTypes(types);
    }

    return result;
  }
Returns the appropriate binary arithmetic rop for the given type and arguments. The result is a
shared instance.

@param types {@code non-null;} sources of the operation
@param int1 {@code non-null;} the int-to-constant rop
@param long1 {@code non-null;} the long-to-constant rop
@param float1 {@code null-ok;} the float-to-constant rop, if any
@param double1 {@code null-ok;} the double-to-constant rop, if any
@param int2 {@code non-null;} the int-to-int rop
@param long2 {@code non-null;} the long-to-long or long-to-int rop
@param float2 {@code null-ok;} the float-to-float rop, if any
@param double2 {@code null-ok;} the double-to-double rop, if any
@return {@code non-null;} an appropriate instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/Rops.java