public static int initializeScalarHeader(BootImageInterface bootImage, int ptr, Object[] tib, int size) throws VM_PragmaInterruptible { int ref = ptr + size;     if (false) {  if (ADDRESS_BASED_HASHING) { bootImage.setAddressWord(ref + STATUS_OFFSET, VM_AllocatorHeader.GC_BARRIER_BIT_MASK); } else {    VM_Word hashCode; do { hashCodeGenerator = hashCodeGenerator.add(VM_Word.one().lsh(HASH_CODE_SHIFT)); hashCode = hashCodeGenerator.and(HASH_CODE_MASK); } while (hashCode.isZero()); bootImage.setAddressWord(ref + STATUS_OFFSET, hashCode.or(VM_AllocatorHeader.GC_BARRIER_BIT_MASK)); } }
public static Object initializeScalarHeader(VM_Address ptr, Object[] tib, int size) {  Object ref = VM_Magic.addressAsObject(ptr.add(size));
  public static int initializeScalarHeader(BootImageInterface bootImage,                                           int ptr, Object[] tib, int size)    throws VM_PragmaInterruptible {    int ref = ptr + size;    // (TIB set by BootImageWriter2)    //    if (MM_Interface.NEEDS_WRITE_BARRIER) {    if (false) {      // must set barrier bit for bootimage objects      if (ADDRESS_BASED_HASHING) {	bootImage.setAddressWord(ref + STATUS_OFFSET, VM_AllocatorHeader.GC_BARRIER_BIT_MASK);      } else {        // Since the write barrier accesses the available bits bytes         // non-atomically we also need to initialize the hash code        // to freeze the rest of the bits in the byte.	VM_Word hashCode;        do {	  hashCodeGenerator = hashCodeGenerator.add(VM_Word.one().lsh(HASH_CODE_SHIFT));	  hashCode = hashCodeGenerator.and(HASH_CODE_MASK);	} while (hashCode.isZero());	bootImage.setAddressWord(ref + STATUS_OFFSET, hashCode.or(VM_AllocatorHeader.GC_BARRIER_BIT_MASK));      }    }    return ref;  }