private static RegisterSpec intern(int reg, TypeBearer type, LocalItem local) {
    ForComparison interningItem = theInterningItem.get();
    interningItem.set(reg, type, local);
    RegisterSpec found = theInterns.get(interningItem);
    if (found == null) {
      found = interningItem.toRegisterSpec();
      RegisterSpec existing = theInterns.putIfAbsent(found, found);
      if (existing != null) {
        return existing;
      }
    }
    return found;
  }
Intern the given triple as an instance of this class.

@param reg {@code >= 0;} the register number
@param type {@code non-null;} the type (or possibly actual value) which is loaded from or
    stored to the indicated register
@param local {@code null-ok;} the associated local variable, if any
@return {@code non-null;} an appropriately-constructed instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpec.java