int nextFP; VM_Address ref_address;
  public VM_Address getNextReferenceAddress() {    int nextFP;    VM_Address ref_address;    if (jniNextRef > jniFramePtr) {      ref_address = VM_Magic.objectAsAddress(jniRefs).add(jniNextRef);      jniNextRef = jniNextRef - BYTES_IN_ADDRESS;      if (verbose > 0) VM.sysWriteln("JNI iterator returning JNI ref: ", ref_address);      return ref_address;    }    // report location of saved processor reg in the Java to C frame    if ( !jniSavedProcessorRegAddr.isZero() ) {      ref_address = jniSavedProcessorRegAddr;      jniSavedProcessorRegAddr = VM_Address.zero();      if (verbose > 0) VM.sysWriteln("JNI iterator returning saved proc: ", ref_address);      return ref_address;    }    // jniNextRef -> savedFramePtr for another "frame" of refs for another    // sequence of Native C frames lower in the stack, or to 0 if this is the    // last jni frame in the JNIRefs stack.  If more frames, initialize for a    // later scan of those refs.    //    if (jniFramePtr > 0) {      jniFramePtr = jniRefs.get(jniFramePtr >> LOG_BYTES_IN_ADDRESS).toInt();      jniNextRef = jniNextRef - BYTES_IN_ADDRESS ;    }        // set register locations for non-volatiles to point to registers saved in    // the JNI transition frame at a fixed negative offset from the callers FP.    VM_Address registerLocation = VM_Magic.getMemoryAddress(this.framePtr).sub(JNI_RVM_NONVOLATILE_OFFSET);    for (int i = LAST_NONVOLATILE_GPR; i >= FIRST_NONVOLATILE_GPR - 1; --i) {      registerLocations.set(i, registerLocation);      registerLocation = registerLocation.sub(BYTES_IN_ADDRESS);    }    if (verbose > 1) VM.sysWriteln("JNI iterator returning 0");    return VM_Address.zero();  // no more refs to report  }