if (mapEntry.imageOffset != OBJECT_NOT_ALLOCATED && overwriteOffset == -1)
if ((!mapEntry.imageOffset.EQ(OBJECT_NOT_ALLOCATED)) && overwriteOffset.isMax())
  private static int copyMagicArrayToBootImage(Object jdkObject,                                                VM_Array rvmArrayType,                                               boolean allocOnly,                                                int overwriteOffset,                                                Object parentObject)     throws IllegalAccessException {    //    // Return object if it is already copied and not being overwritten    //    BootImageMap.Entry mapEntry = BootImageMap.findOrCreateEntry(jdkObject);    if (mapEntry.imageOffset != OBJECT_NOT_ALLOCATED && overwriteOffset == -1)      return mapEntry.imageOffset;    if (verbose >= 2) depth++;        // allocate space in image    int arrayCount       = Array.getLength(jdkObject);    int arrayImageOffset = (overwriteOffset == -1) ? bootImage.allocateArray(rvmArrayType, arrayCount) : overwriteOffset;    mapEntry.imageOffset = arrayImageOffset;    if (verbose >= 2) {      if (depth == depthCutoff)         say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off");      else if (depth < depthCutoff) {        String tab = SPACES.substring(0,depth+1);        if (depth == 0 && jtocCount >= 0)          tab = tab + "jtoc #" + String.valueOf(jtocCount) + ": ";        int arraySize = rvmArrayType.getInstanceSize(arrayCount);        say(tab, "Copying array  ", rvmArrayType.toString(),             "   length=", String.valueOf(arrayCount),            (arraySize >= LARGE_ARRAY_SIZE) ? " large object!!!" : "");      }    }    // copy array elements from host jdk address space into image    VM_Type rvmElementType = rvmArrayType.getElementType();    if (rvmElementType.equals(VM_Type.CodeType)) {      if (VM.BuildForIA32) {        byte values[] = (byte[]) jdkObject;        for (int i = 0; i < arrayCount; ++i)          bootImage.setByte(arrayImageOffset + i, values[i]);      } else {        int values[] = (int[]) jdkObject;        for (int i = 0; i < arrayCount; ++i)          bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_INT), values[i]);      }    } else if (rvmElementType.equals(VM_Type.AddressType)) {      Address values[] = (Address[]) jdkObject;      for (int i=0; i<arrayCount; i++) {        Address addr = values[i];        String msg = "Address array element";        bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS),                                  getWordValue(addr, msg, true));      }    } else if (rvmElementType.equals(VM_Type.ObjectReferenceType)) {      ObjectReference values[] = (ObjectReference[]) jdkObject;      for (int i=0; i<arrayCount; i++) {        ObjectReference or = values[i];        String msg = "ObjectReference array element";        bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS),                                  getWordValue(or, msg, true));      }    } else if (rvmElementType.equals(VM_Type.WordType)) {      Word values[] = (Word[]) jdkObject;      for (int i = 0; i < arrayCount; i++) {        String msg = "Word array element ";        Word addr = values[i];        bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS),                                 getWordValue(addr, msg, false));      }    } else if (rvmElementType.equals(VM_Type.OffsetType)) {      Offset values[] = (Offset[]) jdkObject;      for (int i = 0; i < arrayCount; i++) {        String msg = "Offset array element " + i;        Offset addr = values[i];        bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS),                                 getWordValue(addr, msg, false));      }    } else if (rvmElementType.equals(VM_Type.ExtentType)) {      Extent values[] = (Extent[]) jdkObject;      for (int i = 0; i < arrayCount; i++) {        String msg = "Extent array element ";        Extent addr = values[i];        bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS),                                 getWordValue(addr, msg, false));      }    } else {      fail("unexpected magic array type: " + rvmArrayType);    }    // copy object's TIB into image, if it's not there already    if (!allocOnly) {      if (verbose >= 2) traceContext.push("", jdkObject.getClass().getName(), "tib");      int tibImageOffset = copyToBootImage(rvmArrayType.getTypeInformationBlock(), allocOnly, -1, jdkObject);      if (verbose >= 2) traceContext.pop();      if (tibImageOffset == OBJECT_NOT_ALLOCATED)        fail("can't copy tib for " + jdkObject);      Address tibAddress = bootImageAddress.add(tibImageOffset);      VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, tibAddress, rvmArrayType);    }    if (verbose >= 2) depth--;        return mapEntry.imageOffset;  }