ScanObject.enumeratePointers(t, rootEnum); if (t.jniEnv != null) { ScanObject.enumeratePointers(t.jniEnv, rootEnum); ScanObject.enumeratePointers(t.jniEnv.refsArray(), rootEnum); } ScanObject.enumeratePointers(t.contextRegisters, rootEnum); ScanObject.enumeratePointers(t.contextRegisters.gprs, rootEnum); ScanObject.enumeratePointers(t.hardwareExceptionRegisters, rootEnum); ScanObject.enumeratePointers(t.hardwareExceptionRegisters.gprs, rootEnum);
  public static void scanThread(VM_Thread t, RootEnumerator rootEnum,				AddressDeque rootLocations, 				AddressPairDeque codeLocations) {	    Plan plan = VM_Interface.getPlan();    if (VM.VerifyAssertions) {      /* Currently we do not allow stacks to be moved.  If a stack       * contains native stack frames, then it is impossible for us to       * safely move it.  Prior to the implementation of JNI, Jikes       * RVM did allow the GC system to move thread stacks, and called       * a special fixup routine, thread.fixupMovedStack to adjust all       * of the special interior pointers (SP, FP).  If we implement       * split C & Java stacks then we could allow the Java stacks to       * be moved, but we can't move the native stack. */      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.stack)));    }				      ScanObject.enumeratePointers(t, rootEnum);    if (t.jniEnv != null) {      ScanObject.enumeratePointers(t.jniEnv, rootEnum);      ScanObject.enumeratePointers(t.jniEnv.refsArray(), rootEnum);    }    ScanObject.enumeratePointers(t.contextRegisters, rootEnum);    ScanObject.enumeratePointers(t.contextRegisters.gprs, rootEnum);    ScanObject.enumeratePointers(t.hardwareExceptionRegisters, rootEnum);    ScanObject.enumeratePointers(t.hardwareExceptionRegisters.gprs, rootEnum);    if (VM.VerifyAssertions) {      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t)));      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.stack)));      VM._assert(t.jniEnv == null || Plan.willNotMove(VM_Magic.objectAsAddress(t.jniEnv)));      VM._assert(t.jniEnv == null || t.jniEnv.refsArray() == null || Plan.willNotMove(VM_Magic.objectAsAddress(t.jniEnv.refsArray())));      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.contextRegisters)));      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.contextRegisters.gprs)));      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.hardwareExceptionRegisters)));      VM._assert(Plan.willNotMove(VM_Magic.objectAsAddress(t.hardwareExceptionRegisters.gprs)));    }    // all threads in "unusual" states, such as running threads in    // SIGWAIT (nativeIdleThreads, nativeDaemonThreads,    // passiveCollectorThreads), set their ContextRegisters before    // calling SIGWAIT so that scans of their stacks will start at    // the caller of SIGWAIT    // fp = -1 case, which we need to add support for again this    // is for "attached" threads that have returned to C, but have    // been given references which now reside in the JNIEnv    // sidestack    scanThreadInternal(rootLocations, codeLocations, t, VM_Address.zero());    if (failed == t) {      VM.sysWriteln("RESCANNING with verbose on");      DUMP_STACK = 3;      scanThreadInternal(rootLocations, codeLocations, t, VM_Address.zero());      VM._assert(false);    }  }