Пример #1
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);
   }
 }
Пример #2
0
 /**
  * Load an object reference
  *
  * @param slot The location of the reference
  * @return the object reference loaded from slot
  */
 @Inline
 public ObjectReference loadObjectReference(Address slot) {
   return slot.loadObjectReference();
 }
Пример #3
0
 /**
  * Trace a reference during GC. This involves determining which collection policy applies and
  * calling the appropriate <code>trace</code> method.
  *
  * @param source The source of the reference.
  * @param slot The location containing the object reference to be traced. The object reference is
  *     <i>NOT</i> an interior pointer.
  * @param root True if <code>objLoc</code> is within a root.
  */
 @Inline
 public final void processEdge(ObjectReference source, Address slot) {
   ObjectReference object = slot.loadObjectReference();
   ObjectReference newObject = traceObject(object, false);
   slot.store(newObject);
 }
Пример #4
0
 /**
  * Trace a reference during GC. This involves determining which collection policy applies and
  * calling the appropriate <code>trace</code> method.
  *
  * @param slot The location containing the object reference to be traced. The object reference is
  *     <i>NOT</i> an interior pointer.
  * @param root True if <code>objLoc</code> is within a root.
  */
 @Inline
 public final void processRootEdge(Address slot) {
   ObjectReference object = slot.loadObjectReference();
   ObjectReference newObject = traceObject(object, true);
   slot.store(newObject);
 }