/** {@inheritDoc} */
 @Override
 public boolean isLive(ObjectReference object) {
   if (object.isNull()) return false;
   if (Space.isInSpace(SS.SS0, object)) return SS.hi ? SS.copySpace0.isLive(object) : true;
   if (Space.isInSpace(SS.SS1, object)) return SS.hi ? true : SS.copySpace1.isLive(object);
   return super.isLive(object);
 }
예제 #2
0
 /**
  * This method is the core method during the trace of the object graph. The role of this method is
  * to:
  *
  * <p>1. Ensure the traced object is not collected. 2. If this is the first visit to the object
  * enqueue it to be scanned. 3. Return the forwarded reference to the object.
  *
  * <p>In this instance, we refer objects in the mark-sweep space to the immixSpace for tracing,
  * and defer to the superclass for all others.
  *
  * @param object The object to be traced.
  * @return The new reference to the same object instance.
  */
 @Inline
 public ObjectReference traceObject(ObjectReference object) {
   if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(Immix.immixSpace.inImmixDefragCollection());
   if (object.isNull()) return object;
   if (Space.isInSpace(Immix.IMMIX, object))
     return Immix.immixSpace.traceObject(this, object, Plan.ALLOC_DEFAULT);
   return super.traceObject(object);
 }
예제 #3
0
 /**
  * Given a slot (ie the address of an ObjectReference), ensure that the referent will not move for
  * the rest of the GC. This is achieved by calling the precopyObject method.
  *
  * @param slot The slot to check
  */
 @Inline
 public final void processPrecopyEdge(Address slot) {
   ObjectReference child = slot.loadObjectReference();
   if (!child.isNull()) {
     child = precopyObject(child);
     slot.store(child);
   }
 }
예제 #4
0
 /**
  * Is the specified object live?
  *
  * @param object The object.
  * @return True if the object is live.
  */
 public boolean isLive(ObjectReference object) {
   if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(Immix.immixSpace.inImmixDefragCollection());
   if (object.isNull()) return false;
   if (Space.isInSpace(Immix.IMMIX, object)) {
     return Immix.immixSpace.isLive(object);
   }
   return super.isLive(object);
 }
 @Override
 @Inline
 public ObjectReference traceObject(ObjectReference object) {
   if (object.isNull()) return object;
   if (Space.isInSpace(SS.SS0, object))
     return SS.copySpace0.traceObject(this, object, SS.ALLOC_SS);
   if (Space.isInSpace(SS.SS1, object))
     return SS.copySpace1.traceObject(this, object, SS.ALLOC_SS);
   return super.traceObject(object);
 }