private void checkInvokeSignaturePolymorphic(final int opcode) {
    if (!dexOptions.apiIsSupported(DexFormat.API_METHOD_HANDLES)) {
      fail(
          String.format(
              "invoking a signature-polymorphic requires --min-sdk-version >= %d (currently %d)",
              DexFormat.API_METHOD_HANDLES, dexOptions.minSdkVersion));
    } else if (opcode != ByteOps.INVOKEVIRTUAL) {
      fail("Unsupported signature polymorphic invocation (" + ByteOps.opName(opcode) + ")");
    }
  }
Simulates the effect of the instruction at the given offset, by making appropriate calls on the
given frame.

@param offset {@code offset >= 0;} offset of the instruction to simulate
@param frame {@code non-null;} frame to operate on
@return the length of the instruction, in bytes
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/Simulator.java