VM.assert(false);
VM._assert(false);
  static void putToWorkBuffer (VM_Address ref ) throws VM_PragmaUninterruptible {    if (VALIDATE_BUFFER_PUTS) {      if (!VM_GCUtil.validRef(ref)) {	VM_Scheduler.traceHex("GCWorkQueue:putToWorkBuffer:","bad ref =",ref.toInt());	VM_GCUtil.dumpRef(ref);	VM_Memory.dumpMemory(ref, 64, 64);  // dump 16 words on either side of bad ref	VM_Scheduler.trace("GCWorkQueue:putToWorkBuffer:","dumping executing stack");	VM_Scheduler.dumpStack();	/*** following may generate too much 	VM_Scheduler.trace("GCWorkQueue:putToWorkBuffer:","dumping all thread stacks");	VM_GCUtil.dumpAllThreadStacks();	***/	VM.assert(false);      }    }    VM_CollectorThread myThread = VM_Magic.threadAsCollectorThread(VM_Thread.getCurrentThread());    if (COUNT_GETS_AND_PUTS) myThread.putWorkCount++;    VM_Magic.setMemoryAddress(myThread.putBufferTop, ref);    myThread.putBufferTop = myThread.putBufferTop.sub(4);    if (myThread.putBufferTop.EQ(myThread.putBufferStart)) {      // current buffer is full, give to common pool, get new buffer	          if (WORKQUEUE_COUNTS) myThread.putBufferCount++;      VM_GCWorkQueue.workQueue.addBuffer(myThread.putBufferStart);      VM_GCWorkQueue.allocatePutBuffer(myThread);    // allocate new Put Buffer    }  }  /**   * Get a reference from the thread local get buffer.  If the get buffer   * is empty, and the put buffer has entries, then swap the get and put   * buffers.  If the put buffer is also empty, get a buffer to process   * from the shared queue of buffers.   *   * Get buffer entries are extracted from start to end with "top" pointing   * to the last entry returned (and now empty).   *   * Returns zero when there are no buffers in the shared queue and   * all participating GC threads are waiting.   *   * @return object reference from the get buffer   *         zero when there are no more references to process   */  public static VM_Address getFromWorkBuffer () throws VM_PragmaUninterruptible {    VM_Address newbufaddress;    VM_Address temp;    double temptime;    VM_CollectorThread myThread = VM_Magic.threadAsCollectorThread(VM_Thread.getCurrentThread());    if (COUNT_GETS_AND_PUTS) myThread.getWorkCount++;    myThread.getBufferTop = myThread.getBufferTop.add(4);    if (myThread.getBufferTop.LT(myThread.getBufferEnd))      //easy case- return next work q item      return VM_Magic.getMemoryAddress( myThread.getBufferTop);    // get buffer is empty, getBufferTop == getBufferEnd    // get buffer from shared queue of work buffers    newbufaddress = workQueue.getBuffer();    if (!newbufaddress.isZero()) {      if (WORKQUEUE_COUNTS) myThread.getBufferCount++;      if (!myThread.getBufferStart.isZero())	  VM_GCWorkQueue.freeGetBuffer(myThread);  // release old work q buffer      myThread.getBufferStart = newbufaddress;      //set up pointers for new get buffer      myThread.getBufferTop = myThread.getBufferStart.add(4);      myThread.getBufferEnd = myThread.getBufferStart.add(WORK_BUFFER_SIZE);       return VM_Magic.getMemoryAddress(myThread.getBufferTop);    }        // no buffers in work queue at this time.  if our putBuffer is not empty, swap    // it with our empty get buffer, and start processing the items in it    if (myThread.putBufferTop.LT(myThread.putBufferStart.add(WORK_BUFFER_SIZE - 4))) {            if (WORKQUEUE_COUNTS) myThread.swapBufferCount++;            if (!myThread.getBufferStart.isZero()) {	// have get buffer, swap of get buffer and put buffer	if(trace) VM.sysWrite(" GCWorkQueue.getFromWorkBuffer swapping\n");	// swap start addresses	temp = myThread.putBufferStart;	myThread.putBufferStart = myThread.getBufferStart;	myThread.getBufferStart = temp;	//set end pointer of get buffer	myThread.getBufferEnd = myThread.getBufferStart.add(WORK_BUFFER_SIZE);	// swap current top pointer	temp = myThread.putBufferTop;	myThread.putBufferTop = myThread.getBufferTop.sub(4);  // -4 to compensate for +4 above	myThread.getBufferTop = temp;           // points to empty slot preceding first occupied slot      }      else {	// no get buffer, take put buffer and allocate new put buffer	if(trace) VM.sysWrite(" GCWorkQueue.getFromWorkBuffer swapping-no get buffer\n");	myThread.getBufferStart =  myThread.putBufferStart;	myThread.getBufferTop =  myThread.putBufferTop;    	myThread.getBufferEnd = myThread.getBufferStart.add(WORK_BUFFER_SIZE); 	VM_GCWorkQueue.allocatePutBuffer(myThread);  //get a new Put Buffer      }      //return first entry in new get buffer      myThread.getBufferTop = myThread.getBufferTop.add(4);      return VM_Magic.getMemoryAddress(myThread.getBufferTop);    }    // put buffer and get buffer are both empty    // go wait for work or notification that gc is finished        // get buffer from queue or wait for more work    if (MEASURE_WAIT_TIMES || VM_CollectorThread.MEASURE_WAIT_TIMES) {      temptime = VM_Time.now();      myThread.bufferWaitCount++;    }    newbufaddress = workQueue.getBufferAndWait() ;        if(trace) VM.sysWrite(" GCWorkQueue.getFromWorkBuffer return from getBuffernAndWait\n");        // get a new buffer of work    if (!newbufaddress.isZero()) {      if (MEASURE_WAIT_TIMES || VM_CollectorThread.MEASURE_WAIT_TIMES)	myThread.bufferWaitTime += (VM_Time.now() - temptime);       if (WORKQUEUE_COUNTS) myThread.getBufferCount++;      VM_GCWorkQueue.freeGetBuffer(myThread);  // release the old work q buffer      myThread.getBufferStart = newbufaddress;      //set up pointers for new get buffer      myThread.getBufferTop = myThread.getBufferStart.add(4);      myThread.getBufferEnd = myThread.getBufferStart.add(WORK_BUFFER_SIZE);       return VM_Magic.getMemoryAddress(myThread.getBufferTop);    }        // no more work and no more buffers ie end of work queue phase of gc    if (MEASURE_WAIT_TIMES || VM_CollectorThread.MEASURE_WAIT_TIMES)      myThread.finishWaitTime = (VM_Time.now() - temptime);    // reset top ptr for get buffer to its proper "empty" state    myThread.getBufferTop = myThread.getBufferStart.add(WORK_BUFFER_SIZE - 4);        if(trace) VM.sysWrite(" GCWorkQueue.getFromWorkBuffer no more work\n");    return VM_Address.zero();      }  // getFromWorkBuffer