VM_Field field = bcodes.getFieldReference(); VM_TableBasedDynamicLinker.resolveField(field.getDictionaryId());
int cpi = bcodes.getFieldReferenceIndex(); int fid = bcodes.declaringClass().getFieldRefId(cpi); VM_TableBasedDynamicLinker.resolveField(fid);
  public static void resolveDynamicLink (VM_OptCompiledMethod cm, int offset)     throws VM_ResolutionException {    VM_OptMachineCodeMap map = cm.getMCMap();    int bci = map.getBytecodeIndexForMCOffset(offset);    VM_Method realMethod = map.getMethodForMCOffset(offset);    if (bci == -1 || realMethod == null)      VM.sysFail("Mapping to source code location not available at Dynamic Linking point\n");    VM_BytecodeStream bcodes = realMethod.getBytecodes();    bcodes.reset(bci);    int opcode = bcodes.nextInstruction();    switch (opcode) {    case JBC_getfield: case JBC_putfield:     case JBC_getstatic: case JBC_putstatic:       { 	VM_Field field = bcodes.getFieldReference();	VM_TableBasedDynamicLinker.resolveField(field.getDictionaryId());      }      break;    case JBC_invokevirtual:case JBC_invokestatic:      {	VM_Method method = bcodes.getMethodReference();	VM_TableBasedDynamicLinker.resolveMethod(method.getDictionaryId());      }      break;    case JBC_invokeinterface:      // We believe that in the RVM this cannot cause dynamic linking    case JBC_invokespecial:             // We believe that the offsets will always be valid for an       // invokespecial; As part of creating the uninitialized instance       // of an object, the runtime system must have invoked the class loader       // to load the class and therefore by the time the call to the init       // code is executed, the method offset table will contain a valid value.    default:      if (VM.VerifyAssertions)	VM._assert(VM.NOT_REACHED, 		  "Unexpected case in VM_OptLinker.resolveDynamicLink");      break;    }  }