worklist.sort();
if (!worklist.isEmpty()) worklist.sort();
  private final static void findDeaths() {    /* Only the merlin analysis needs to compute death times */    if (MERLIN_ANALYSIS) {      /* Start with an empty stack. */      if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(worklist.isEmpty());      /* Scan the linked list of objects within each region */      for (int allocator = 0; allocator < ALLOCATORS; allocator++) {        ObjectReference thisRef = objectLinks.get(allocator);        /* Start at the top of each linked list */        while (!thisRef.isNull()) {          /* Add the unreachable objects onto the worklist. */          if (!getTraceLocal().isReachable(thisRef))            worklist.push(thisRef);          thisRef = VM.traceInterface.getLink(thisRef);        }      }      /* Sort the objects on the worklist by their timestamp */      worklist.sort();      /* Now compute the death times. */      computeTransitiveClosure();    }    /* Output the death times for each object */    for (int allocator = 0; allocator < ALLOCATORS; allocator++) {      ObjectReference thisRef = objectLinks.get(allocator);      ObjectReference prevRef = ObjectReference.nullReference(); // the last live object seen      while (!thisRef.isNull()) {        ObjectReference nextRef = VM.traceInterface.getLink(thisRef);        /* Maintain reachable objects on the linked list of allocated objects */        if (getTraceLocal().isReachable(thisRef)) {          thisRef = getTraceLocal().getForwardedReference(thisRef);          VM.traceInterface.setLink(thisRef, prevRef);          prevRef = thisRef;        } else {          /* For brute force lifetime analysis, objects become              unreachable "now" */          Word deadTime;          if (MERLIN_ANALYSIS)            deadTime = VM.traceInterface.getDeathTime(thisRef);          else            deadTime = lastGC;          /* Add the death record to the trace for unreachable objects. */          trace.push(TRACE_DEATH);          trace.push(VM.traceInterface.getOID(thisRef));          trace.push(deadTime);        }        thisRef = nextRef;      }      /* Purge the list of unreachable objects... */      objectLinks.set(allocator, prevRef);    }  }