VM.sysWriteHex ( VM_Magic.getMemoryWord ( framePtr.add(mapOffset) ) );
VM.sysWriteHex ( VM_Magic.getMemoryInt ( framePtr.add(mapOffset) ) );
  public VM_Address getNextReferenceAddress() {    if (counterArrayBase) {      counterArrayBase = false;      return VM_Address.fromInt(registerLocations[EBX]);    }    if (mapId < 0) {      mapOffset = maps.getNextJSRRef(mapOffset);    } else {      mapOffset = maps.getNextRef(mapOffset, mapId);    }    if (VM.TraceStkMaps || TRACE_ALL) {      VM.sysWrite("VM_BaselineGCMapIterator getNextReferenceOffset = ");      VM.sysWriteHex(mapOffset);      VM.sysWrite(".\n");      VM.sysWrite("Reference is ");      VM.sysWriteHex ( VM_Magic.getMemoryWord ( framePtr.add(mapOffset) ) );      VM.sysWrite(".\n");      if (mapId < 0) 	VM.sysWrite("Offset is a JSR return address ie internal pointer.\n");    }    if (mapOffset != 0) {      if (bridgeParameterMappingRequired)	// TODO  clean this	return (framePtr.add(mapOffset - BRIDGE_FRAME_EXTRA_SIZE ));      else	return (framePtr.add(mapOffset) );    } else if (bridgeParameterMappingRequired) {      if (VM.TraceStkMaps || TRACE_ALL || TRACE_DL) {	VM.sysWrite("getNextReferenceAddress: bridgeTarget="); VM.sysWrite(bridgeTarget); VM.sysWrite("\n");      }               if (!bridgeRegistersLocationUpdated) {	// point registerLocations[] to our callers stackframe	//	registerLocations[JTOC] = framePtr.add(JTOC_SAVE_OFFSET).toInt();	registerLocations[T0]   = framePtr.add(T0_SAVE_OFFSET).toInt();	registerLocations[T1]   = framePtr.add(T1_SAVE_OFFSET).toInt();	registerLocations[EBX]  = framePtr.add(EBX_SAVE_OFFSET).toInt();		bridgeRegistersLocationUpdated = true;      }      // handle implicit "this" parameter, if any      //      if (bridgeParameterIndex == -1) {	bridgeParameterIndex       += 1;	bridgeRegisterIndex        += 1;	bridgeRegisterLocation     = bridgeRegisterLocation.sub(4);	bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(4);		if (VM.TraceStkMaps || TRACE_ALL || TRACE_DL) {	  VM.sysWrite("VM_BaselineGCMapIterator getNextReferenceOffset = dynamic link GPR this ");	  VM.sysWrite(bridgeRegisterLocation.add(4));	  VM.sysWrite(".\n");	}	return bridgeRegisterLocation.add(4);      }               // now the remaining parameters      //      while(bridgeParameterIndex < bridgeParameterTypes.length) {	VM_TypeReference bridgeParameterType = bridgeParameterTypes[bridgeParameterIndex++];		if (bridgeParameterType.isReferenceType()) {	  bridgeRegisterIndex        += 1;	  bridgeRegisterLocation     = bridgeRegisterLocation.sub(4);	  bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(4);	  	  if (bridgeRegisterIndex <= NUM_PARAMETER_GPRS) {	    if (VM.TraceStkMaps || TRACE_ALL || TRACE_DL) {	      VM.sysWrite("VM_BaselineGCMapIterator getNextReferenceOffset = dynamic link GPR parameter ");	      VM.sysWrite(bridgeRegisterLocation.add(4));	      VM.sysWrite(".\n");	    }	    return bridgeRegisterLocation.add(4);	  } else {	    if (bridgeSpilledParameterMappingRequired) {	      if (VM.TraceStkMaps || TRACE_ALL || TRACE_DL) {		VM.sysWrite("VM_BaselineGCMapIterator getNextReferenceOffset = dynamic link spilled parameter ");		VM.sysWrite(bridgeSpilledParamLocation.add(4));		VM.sysWrite(".\n");	      }	      return bridgeSpilledParamLocation.add(4);	    } else {	      break;	    }	  }	} else if (bridgeParameterType.isLongType()) {	  bridgeRegisterIndex        += 2;	  bridgeRegisterLocation     = bridgeRegisterLocation.sub(8);	  bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(8);	} else if (bridgeParameterType.isDoubleType()) {	  bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(8);	} else if (bridgeParameterType.isFloatType()) {	  bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(4);	} else { 	  // boolean, byte, char, short, int	  bridgeRegisterIndex        += 1;	  bridgeRegisterLocation     = bridgeRegisterLocation.sub(4);	  bridgeSpilledParamLocation = bridgeSpilledParamLocation.sub(4);	}      }    } else {      // point registerLocations[] to our callers stackframe      //      registerLocations[JTOC] = framePtr.add(JTOC_SAVE_OFFSET).toInt();      registerLocations[EBX] = framePtr.add(EBX_SAVE_OFFSET).toInt();    }        return VM_Address.zero();  }