public RegisterSpecList withOffset(int delta) {
    int sz = size();

    if (sz == 0) {
      // Don't bother making a new zero-element instance.
      return this;
    }

    RegisterSpecList result = new RegisterSpecList(sz);

    for (int i = 0; i < sz; i++) {
      RegisterSpec one = (RegisterSpec) get0(i);
      if (one != null) {
        result.set0(i, one.withOffset(delta));
      }
    }

    if (isImmutable()) {
      result.setImmutable();
    }

    return result;
  }
Returns an instance that is identical to this one, except that all register numbers are offset
by the given amount. Mutability of the result is inherited from the original.

@param delta the amount to offset the register numbers by
@return {@code non-null;} an appropriately-constructed instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpecList.java