hashCodeGenerator += (1 << HASH_CODE_SHIFT); hashCode = hashCodeGenerator & HASH_CODE_MASK; } while (hashCode == 0);
hashCodeGenerator = hashCodeGenerator.add(VM_Word.one().lsh(HASH_CODE_SHIFT)); hashCode = hashCodeGenerator.and(HASH_CODE_MASK); } while (hashCode.isZero());
  private static int installHashCode(Object o) throws VM_PragmaNoInline {    int hashCode;    do {      hashCodeGenerator += (1 << HASH_CODE_SHIFT);      hashCode = hashCodeGenerator & HASH_CODE_MASK;    } while (hashCode == 0);    while (true) {      int statusWord = VM_Magic.prepareInt(o, STATUS_OFFSET);      if ((statusWord & HASH_CODE_MASK) != 0) // some other thread installed a hashcode        return (statusWord & HASH_CODE_MASK) >> HASH_CODE_SHIFT;      if (VM_Magic.attemptInt(o, STATUS_OFFSET, statusWord, statusWord | hashCode))        return hashCode >> HASH_CODE_SHIFT;  // we installed the hash code    }  }