public int size() {
    int result = size;

    if (result < 0) {
      int len = specs.length;

      result = 0;
      for (int i = 0; i < len; i++) {
        if (specs[i] != null) {
          result++;
        }
      }

      size = result;
    }

    return result;
  }
Gets the current size of this instance.

@return {@code >= 0;} the size
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpecSet.java