if (VM.TraceStkMaps) { VM.sysWrite("VM_ReferenceMaps-getJSRnextReturnAddrref- not initial- next return offset = "); VM.sysWrite( nextOffset); VM.sysWrite( "\n"); } return (nextOffset);
if (VM.TraceStkMaps) { VM.sysWrite("VM_ReferenceMaps-getJSRnextReturnAddrref- not initial- next return offset = "); VM.sysWrite( nextOffset); VM.sysWrite( "\n"); } return nextOffset;
  getNextJSRReturnAddr(int offset) {    int mapword, startbitnumb, bitnum;    // use the preallocated map to locate the current point of interest    mapword   = mergedReturnAddressMap;    if ( bytesPerMap == 0)      {      if (VM.TraceStkMaps)	 {          VM.sysWrite("VM_ReferenceMaps-getJSRNextReturnAddr-initial call no returnaddresses \n ");         }         return 0;  // no map ie no refs      }    // is this the initial scan for the map    if ( offset == STARTOFFSET)    {       startbitnumb = 1;      // start search from beginning       bitnum = scanForNextRef(startbitnumb, mapword,  bitsPerMap,  unusualReferenceMaps);       if (VM.TraceStkMaps)	 {         VM.sysWrite("VM_ReferenceMaps-getJSRNextReturnAddr-initial call startbitnum, mapword, bitspermap = ");         VM.sysWrite(startbitnumb );         VM.sysWrite(" , ");         VM.sysWrite(mapword );         VM.sysWrite(" , ");         VM.sysWrite(bitsPerMap);         VM.sysWrite(" \n ");         VM.sysWrite("VM_ReferenceMaps-getJSRNextReturnAddr-initial call return bitnum = ");         VM.sysWrite( bitnum);         VM.sysWrite( "\n");	 }       if ( bitnum == NOMORE)	 {            return NOMORE;	 }      int initOffset =  convertJsrBitNumToOffset(bitnum);       if (VM.TraceStkMaps)	 {         VM.sysWrite("VM_ReferenceMaps-getJSRNextReturnAddr-initial offset return = " );         VM.sysWrite( initOffset);         VM.sysWrite( "\n");	 }       return (initOffset);    }    // get bitnum and determine mapword to restart scan    bitnum = convertJsrOffsetToBitNum(offset);  // get the bit number   // scan forward from current position to next ref   if (VM.TraceStkMaps)       {       VM.sysWrite("VM_ReferenceMaps-getJSRnextReturnAddr- not initial- starting offset, starting bitnum  = ");       VM.sysWrite( offset);       VM.sysWrite(" ");       VM.sysWrite( bitnum);       VM.sysWrite( "\n");       }   bitnum = scanForNextRef(bitnum+1,mapword,( bitsPerMap - (bitnum -1)), unusualReferenceMaps);   if (VM.TraceStkMaps)	{         VM.sysWrite("VM_ReferenceMaps-getJSRnextref- not initial- scan returned bitnum = ");         VM.sysWrite(  bitnum );         VM.sysWrite( "\n");	}   // test for end of map   if (bitnum == NOMORE)     {        return NOMORE;     }     int nextOffset =  convertJsrBitNumToOffset(bitnum);   // else convert bitnum to stack offset and return   if (VM.TraceStkMaps)       {        VM.sysWrite("VM_ReferenceMaps-getJSRnextReturnAddrref- not initial- next return offset = ");        VM.sysWrite( nextOffset);        VM.sysWrite( "\n");        }   return (nextOffset);  }