if (addr.LE(HEAP_END)) { if (addr.GE(NURSERY_START)) return Copy.traceObject(obj); else if (addr.GE(MS_START)) return msCollector.traceObject(obj); else if (addr.GE(BOOT_START)) return Immortal.traceObject(obj); } return obj;
byte space = VMResource.getSpace(addr); switch (space) { case NURSERY_SPACE:   return Copy.traceObject(obj); case MS_SPACE:        return msSpace.traceObject(obj, VMResource.getTag(addr)); case LOS_SPACE:       return losSpace.traceObject(obj); case IMMORTAL_SPACE:  return Immortal.traceObject(obj); case BOOT_SPACE:	  return Immortal.traceObject(obj); case META_SPACE:	  return obj; default: if (VM.VerifyAssertions) { VM.sysWrite(addr); VM.sysWriteln("Plan.traceObject: unknown space", space); VM.sysFail("Plan.traceObject: unknown space"); } return obj; }
  public static final VM_Address traceObject(VM_Address obj) {    VM_Address addr = VM_Interface.refToAddress(obj);    if (addr.LE(HEAP_END)) {      if (addr.GE(NURSERY_START))	return Copy.traceObject(obj);      else if (addr.GE(MS_START))	return msCollector.traceObject(obj);      else if (addr.GE(BOOT_START))	return Immortal.traceObject(obj);    } // else this is not a heap pointer    return obj;  }