lpart_one = 0;
  private OSR_ExecutionState getExecStateSequence(VM_Thread thread,                                                  byte[] stack,                                                  int   ipOffset,                                                  int   fpOffset,                                                  int   cmid,                                                  int   tsFPOffset,                                                  OSR_TempRegisters registers,                                                  OSR_EncodedOSRMap osrmap) {    // go through the stack frame and extract values    // In the variable value list, we keep the order as follows:    // L0, L1, ..., S0, S1, ....          /* go over osr map element, build list of OSR_VariableElement.      * assuming iterator has ordered element as     *     L0, L1, ..., S0, S1, ...     *      *     ThreadSwitch           *     threadSwitchFromOsr       *     FOO                                        <-- fpOffset     *     * Also, all registers saved by threadSwitchFromDeopt method      * is restored in "registers", address for object is converted     * back to object references.     *      * This method should be called in non-GC critical section since     * it allocates many objects.     */    // for the long type value which has two int parts.    // this hold the first part for LONG1.    long lpart_one = 0;    // now recover execution states    OSR_MapIterator iterator =       osrmap.getOsrMapIteratorForMCOffset(ipOffset);    if (VM.VerifyAssertions) VM._assert(iterator != null);    OSR_ExecutionState state = new OSR_ExecutionState(thread,                                                      fpOffset,                                                      cmid,                                                      iterator.getBcIndex(),                                                      tsFPOffset);    VM_MethodReference mref = VM_MemberReference.getMemberRef(iterator.getMethodId()).asMethodReference();    state.setMethod((VM_NormalMethod)mref.peekResolvedMethod());    // this is not caller, but the callee, reverse it when outside    // of this function.    state.callerState = null;        if (VM.TraceOnStackReplacement) {          VM.sysWriteln("osr map table of "+state.meth.toString());        }            while (iterator.hasMore()) {            if (iterator.getMethodId() != state.meth.getId()) {               OSR_ExecutionState newstate = new OSR_ExecutionState(thread,                                                             fpOffset,                                                             cmid,                                                             iterator.getBcIndex(),                                                             tsFPOffset);        mref = VM_MemberReference.getMemberRef(iterator.getMethodId()).asMethodReference();        newstate.setMethod((VM_NormalMethod)mref.peekResolvedMethod());        // this is not caller, but the callee, reverse it when outside        // of this function.        newstate.callerState = state;        state = newstate;                if (VM.TraceOnStackReplacement) {                  VM.sysWriteln("osr map table of "+state.meth.toString());                }              }       // create a OSR_VariableElement for it.      int kind  = iterator.getKind();      int num   = iterator.getNumber();      int tcode = iterator.getTypeCode();      int vtype = iterator.getValueType();      int value = iterator.getValue();      iterator.moveToNext();          if (VM.TraceOnStackReplacement) {                VM.sysWrite( (kind == LOCAL)?"L":"S");                VM.sysWrite( num);                VM.sysWrite(" , ");                if (vtype == ICONST) {                  VM.sysWrite("ICONST ");                  VM.sysWrite(value);                } else if (vtype == PHYREG) {                   VM.sysWrite("PHYREG ");                  VM.sysWrite(GPR_NAMES[value]);                } else if (vtype == SPILL) {                   VM.sysWrite("SPILL  ");                  VM.sysWrite(value);                }                VM.sysWriteln();          }              switch (tcode) {      case INT: {        int ibits = getIntBitsFrom(vtype,                                   value,                                   stack,                                   fpOffset,                                   registers);        state.add(new OSR_VariableElement(kind,                                         num,                                         tcode,                                         ibits));        break;      }      case FLOAT: {        float fv = getFloatFrom(vtype,                                value,                                stack,                                fpOffset,                                registers);        int ibits = VM_Magic.floatAsIntBits(fv);        state.add(new OSR_VariableElement(kind,                                         num,                                         tcode,                                         ibits));        break;      }      case LONG1: {        lpart_one = getIntBitsFrom(vtype,                                   value,                                   stack,                                   fpOffset,                                   registers);        break;      }      case LONG2: {        long lpart_two = getIntBitsFrom(vtype,                                        value,                                        stack,                                        fpOffset,                                        registers);        long lbits = (lpart_one << 32) | (lpart_two & 0x0FFFFFFFF);        state.add(new OSR_VariableElement(kind,                                         num,                                         LONG,    // not use LONG2,                                          lbits));        lpart_one = 0;        break;      }      case DOUBLE: {        double dv = getDoubleFrom(vtype,                                  value,                                  stack,                                  fpOffset,                                  registers);        long lbits = VM_Magic.doubleAsLongBits(dv);        state.add(new OSR_VariableElement(kind,                                         num,                                         tcode,                                         lbits));        break;      }      // I believe I did not handle return address correctly because      // the opt compiler did inlining of JSR/RET.      // To be VERIFIED.      case ADDR: {        int bcIndex  = getIntBitsFrom(vtype,                                      value,                                      stack,                                      fpOffset,                                      registers);               state.add(new OSR_VariableElement(kind,                                         num,                                         tcode,                                         bcIndex));        break;      }      case REF: {        Object ref = getObjectFrom(vtype,                                   value,                                   stack,                                   fpOffset,                                   registers);        state.add(new OSR_VariableElement(kind,                                         num,                                         tcode,                                         ref));        break;      }      default:        if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);        break;      } // switch     } // for loop    return state;  }