public RegisterSpecList withFirst(RegisterSpec spec) {
    int sz = size();
    RegisterSpecList result = new RegisterSpecList(sz + 1);

    for (int i = 0; i < sz; i++) {
      result.set0(i + 1, get0(i));
    }

    result.set0(0, spec);
    if (isImmutable()) {
      result.setImmutable();
    }

    return result;
  }
Returns a new instance, which is the same as this instance, except that it has an additional
element prepended to the original. Mutability of the result is inherited from the original.

@param spec {@code non-null;} the new first spec (to prepend)
@return {@code non-null;} an appropriately-constructed instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpecList.java