public static int initializeArrayHeader(BootImageInterface bootImage, int ptr, Object[] tib, int size) { int ref = ptr + ARRAY_HEADER_SIZE;   if (VM_Collector.NEEDS_WRITE_BARRIER) {  if (ADDRESS_BASED_HASHING) { bootImage.setFullWord(ref + STATUS_OFFSET, VM_AllocatorHeader.GC_BARRIER_BIT_MASK); } else {    int hashCode; do { hashCodeGenerator += (1 << HASH_CODE_SHIFT); hashCode = hashCodeGenerator & HASH_CODE_MASK; } while (hashCode == 0); bootImage.setFullWord(ref + STATUS_OFFSET, hashCode | VM_AllocatorHeader.GC_BARRIER_BIT_MASK); } }
public static Object initializeArrayHeader(VM_Address ptr, Object[] tib, int size) {  Object ref = VM_Magic.addressAsObject(ptr.add(ARRAY_HEADER_SIZE));
  public static int initializeArrayHeader(BootImageInterface bootImage, int ptr, 					  Object[] tib, int size) {    int ref = ptr + ARRAY_HEADER_SIZE;    // (TIB set by BootImageWriter2; array length set by VM_ObjectModel)    if (VM_Collector.NEEDS_WRITE_BARRIER) {      // must set barrier bit for bootimage objects      if (ADDRESS_BASED_HASHING) {	bootImage.setFullWord(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.	int hashCode;	do {	  hashCodeGenerator += (1 << HASH_CODE_SHIFT);	  hashCode = hashCodeGenerator & HASH_CODE_MASK;	} while (hashCode == 0);	bootImage.setFullWord(ref + STATUS_OFFSET, hashCode | VM_AllocatorHeader.GC_BARRIER_BIT_MASK);      }    }    return ref;  }