< prev index next >

src/hotspot/share/ci/ciReplay.cpp

Print this page

  25 #include "precompiled.hpp"
  26 #include "ci/ciMethodData.hpp"
  27 #include "ci/ciReplay.hpp"
  28 #include "ci/ciSymbol.hpp"
  29 #include "ci/ciKlass.hpp"
  30 #include "ci/ciUtilities.inline.hpp"
  31 #include "classfile/javaClasses.hpp"
  32 #include "classfile/symbolTable.hpp"
  33 #include "classfile/systemDictionary.hpp"
  34 #include "compiler/compilationPolicy.hpp"
  35 #include "compiler/compileBroker.hpp"
  36 #include "compiler/compilerDefinitions.inline.hpp"
  37 #include "interpreter/linkResolver.hpp"
  38 #include "jvm.h"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/oopFactory.hpp"
  41 #include "memory/resourceArea.hpp"
  42 #include "oops/constantPool.inline.hpp"
  43 #include "oops/cpCache.inline.hpp"
  44 #include "oops/fieldStreams.inline.hpp"

  45 #include "oops/klass.inline.hpp"
  46 #include "oops/method.inline.hpp"
  47 #include "oops/oop.inline.hpp"
  48 #include "oops/resolvedIndyEntry.hpp"
  49 #include "prims/jvmtiExport.hpp"
  50 #include "prims/methodHandles.hpp"
  51 #include "runtime/fieldDescriptor.inline.hpp"
  52 #include "runtime/globals_extension.hpp"
  53 #include "runtime/handles.inline.hpp"
  54 #include "runtime/java.hpp"
  55 #include "runtime/jniHandles.inline.hpp"
  56 #include "runtime/threads.hpp"
  57 #include "utilities/copy.hpp"
  58 #include "utilities/macros.hpp"
  59 #include "utilities/utf8.hpp"
  60 
  61 // ciReplay
  62 
  63 typedef struct _ciMethodDataRecord {
  64   const char* _klass_name;

 969     ConstantPool* cp = k->constants();
 970     if (length != cp->length()) {
 971       report_error("constant pool length mismatch: wrong class files?");
 972       return;
 973     }
 974 
 975     int parsed_two_word = 0;
 976     for (int i = 1; i < length; i++) {
 977       int tag = parse_int("tag");
 978       if (had_error()) {
 979         return;
 980       }
 981       switch (cp->tag_at(i).value()) {
 982         case JVM_CONSTANT_UnresolvedClass: {
 983           if (tag == JVM_CONSTANT_Class) {
 984             tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
 985             Klass* k = cp->klass_at(i, CHECK);
 986           }
 987           break;
 988         }

 989         case JVM_CONSTANT_Long:
 990         case JVM_CONSTANT_Double:
 991           parsed_two_word = i + 1;
 992 
 993         case JVM_CONSTANT_ClassIndex:
 994         case JVM_CONSTANT_StringIndex:
 995         case JVM_CONSTANT_String:
 996         case JVM_CONSTANT_UnresolvedClassInError:
 997         case JVM_CONSTANT_Fieldref:
 998         case JVM_CONSTANT_Methodref:
 999         case JVM_CONSTANT_InterfaceMethodref:
1000         case JVM_CONSTANT_NameAndType:
1001         case JVM_CONSTANT_Utf8:
1002         case JVM_CONSTANT_Integer:
1003         case JVM_CONSTANT_Float:
1004         case JVM_CONSTANT_MethodHandle:
1005         case JVM_CONSTANT_MethodType:
1006         case JVM_CONSTANT_Dynamic:
1007         case JVM_CONSTANT_InvokeDynamic:
1008           if (tag != cp->tag_at(i).value()) {

1015           if (tag == JVM_CONSTANT_UnresolvedClass) {
1016             Klass* k = cp->klass_at(i, CHECK);
1017             tty->print_cr("Warning: entry was unresolved in the replay data: %s", k->name()->as_utf8());
1018           } else if (tag != JVM_CONSTANT_Class) {
1019             report_error("Unexpected tag");
1020             return;
1021           }
1022           break;
1023 
1024         case 0:
1025           if (parsed_two_word == i) continue;
1026 
1027         default:
1028           fatal("Unexpected tag: %d", cp->tag_at(i).value());
1029           break;
1030       }
1031 
1032     }
1033   }
1034 
1035   // staticfield <klass> <name> <signature> <value>
1036   //
1037   // Initialize a class and fill in the value for a static field.
1038   // This is useful when the compile was dependent on the value of
1039   // static fields but it's impossible to properly rerun the static
1040   // initializer.
1041   void process_staticfield(TRAPS) {
1042     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1043 
1044     if (k == nullptr || ReplaySuppressInitializers == 0 ||
1045         (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1046       skip_remaining();
1047       return;
1048     }
1049 
1050     assert(k->is_initialized(), "must be");
1051 
1052     const char* field_name = parse_escaped_string();
1053     const char* field_signature = parse_string();
1054     fieldDescriptor fd;
1055     Symbol* name = SymbolTable::new_symbol(field_name);
1056     Symbol* sig = SymbolTable::new_symbol(field_signature);
1057     if (!k->find_local_field(name, sig, &fd) ||
1058         !fd.is_static() ||
1059         fd.has_initial_value()) {
1060       report_error(field_name);
1061       return;





















































1062     }

1063 
1064     oop java_mirror = k->java_mirror();
1065     if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1066       int length = parse_int("array length");
1067       oop value = nullptr;
1068 
1069       if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1070         // multi dimensional array
1071         ArrayKlass* kelem = (ArrayKlass *)parse_klass(CHECK);
1072         if (kelem == nullptr) {
1073           return;
1074         }
1075         int rank = 0;
1076         while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1077           rank++;
1078         }
1079         jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1080         dims[0] = length;
1081         for (int i = 1; i < rank; i++) {
1082           dims[i] = 1; // These aren't relevant to the compiler
1083         }
1084         value = kelem->multi_allocate(rank, dims, CHECK);
1085       } else {
1086         if (strcmp(field_signature, "[B") == 0) {
1087           value = oopFactory::new_byteArray(length, CHECK);
1088         } else if (strcmp(field_signature, "[Z") == 0) {
1089           value = oopFactory::new_boolArray(length, CHECK);
1090         } else if (strcmp(field_signature, "[C") == 0) {
1091           value = oopFactory::new_charArray(length, CHECK);
1092         } else if (strcmp(field_signature, "[S") == 0) {
1093           value = oopFactory::new_shortArray(length, CHECK);
1094         } else if (strcmp(field_signature, "[F") == 0) {
1095           value = oopFactory::new_floatArray(length, CHECK);
1096         } else if (strcmp(field_signature, "[D") == 0) {
1097           value = oopFactory::new_doubleArray(length, CHECK);
1098         } else if (strcmp(field_signature, "[I") == 0) {
1099           value = oopFactory::new_intArray(length, CHECK);
1100         } else if (strcmp(field_signature, "[J") == 0) {
1101           value = oopFactory::new_longArray(length, CHECK);
1102         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1103                    field_signature[1] == JVM_SIGNATURE_CLASS) {
1104           parse_klass(CHECK); // eat up the array class name
1105           Klass* kelem = resolve_klass(field_signature + 1, CHECK);
1106           value = oopFactory::new_objArray(kelem, length, CHECK);





1107         } else {
1108           report_error("unhandled array staticfield");
1109         }
1110       }























































































1111       java_mirror->obj_field_put(fd.offset(), value);
1112     } else {
1113       const char* string_value = parse_escaped_string();
1114       if (strcmp(field_signature, "I") == 0) {
1115         int value = atoi(string_value);
1116         java_mirror->int_field_put(fd.offset(), value);
1117       } else if (strcmp(field_signature, "B") == 0) {
1118         int value = atoi(string_value);
1119         java_mirror->byte_field_put(fd.offset(), value);
1120       } else if (strcmp(field_signature, "C") == 0) {
1121         int value = atoi(string_value);
1122         java_mirror->char_field_put(fd.offset(), value);
1123       } else if (strcmp(field_signature, "S") == 0) {
1124         int value = atoi(string_value);
1125         java_mirror->short_field_put(fd.offset(), value);
1126       } else if (strcmp(field_signature, "Z") == 0) {
1127         int value = atoi(string_value);
1128         java_mirror->bool_field_put(fd.offset(), value);
1129       } else if (strcmp(field_signature, "J") == 0) {
1130         jlong value;
1131         if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1132           fprintf(stderr, "Error parsing long: %s\n", string_value);
1133           return;
1134         }
1135         java_mirror->long_field_put(fd.offset(), value);
1136       } else if (strcmp(field_signature, "F") == 0) {
1137         float value = atof(string_value);
1138         java_mirror->float_field_put(fd.offset(), value);
1139       } else if (strcmp(field_signature, "D") == 0) {
1140         double value = atof(string_value);
1141         java_mirror->double_field_put(fd.offset(), value);
1142       } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1143         Handle value = java_lang_String::create_from_str(string_value, CHECK);
1144         java_mirror->obj_field_put(fd.offset(), value());
1145       } else if (field_signature[0] == JVM_SIGNATURE_CLASS) {
1146         Klass* k = resolve_klass(string_value, CHECK);
1147         oop value = InstanceKlass::cast(k)->allocate_instance(CHECK);
1148         java_mirror->obj_field_put(fd.offset(), value);
1149       } else {
1150         report_error("unhandled staticfield");
1151       }
1152     }
1153   }
1154 
1155 #if INCLUDE_JVMTI
1156   // JvmtiExport <field> <value>
1157   void process_JvmtiExport(TRAPS) {
1158     const char* field = parse_string();
1159     bool value = parse_int("JvmtiExport flag") != 0;
1160     if (strcmp(field, "can_access_local_variables") == 0) {
1161       JvmtiExport::set_can_access_local_variables(value);
1162     } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1163       JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1164     } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1165       JvmtiExport::set_can_post_on_exceptions(value);
1166     } else {
1167       report_error("Unrecognized JvmtiExport directive");
1168     }
1169   }

  25 #include "precompiled.hpp"
  26 #include "ci/ciMethodData.hpp"
  27 #include "ci/ciReplay.hpp"
  28 #include "ci/ciSymbol.hpp"
  29 #include "ci/ciKlass.hpp"
  30 #include "ci/ciUtilities.inline.hpp"
  31 #include "classfile/javaClasses.hpp"
  32 #include "classfile/symbolTable.hpp"
  33 #include "classfile/systemDictionary.hpp"
  34 #include "compiler/compilationPolicy.hpp"
  35 #include "compiler/compileBroker.hpp"
  36 #include "compiler/compilerDefinitions.inline.hpp"
  37 #include "interpreter/linkResolver.hpp"
  38 #include "jvm.h"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/oopFactory.hpp"
  41 #include "memory/resourceArea.hpp"
  42 #include "oops/constantPool.inline.hpp"
  43 #include "oops/cpCache.inline.hpp"
  44 #include "oops/fieldStreams.inline.hpp"
  45 #include "oops/inlineKlass.inline.hpp"
  46 #include "oops/klass.inline.hpp"
  47 #include "oops/method.inline.hpp"
  48 #include "oops/oop.inline.hpp"
  49 #include "oops/resolvedIndyEntry.hpp"
  50 #include "prims/jvmtiExport.hpp"
  51 #include "prims/methodHandles.hpp"
  52 #include "runtime/fieldDescriptor.inline.hpp"
  53 #include "runtime/globals_extension.hpp"
  54 #include "runtime/handles.inline.hpp"
  55 #include "runtime/java.hpp"
  56 #include "runtime/jniHandles.inline.hpp"
  57 #include "runtime/threads.hpp"
  58 #include "utilities/copy.hpp"
  59 #include "utilities/macros.hpp"
  60 #include "utilities/utf8.hpp"
  61 
  62 // ciReplay
  63 
  64 typedef struct _ciMethodDataRecord {
  65   const char* _klass_name;

 970     ConstantPool* cp = k->constants();
 971     if (length != cp->length()) {
 972       report_error("constant pool length mismatch: wrong class files?");
 973       return;
 974     }
 975 
 976     int parsed_two_word = 0;
 977     for (int i = 1; i < length; i++) {
 978       int tag = parse_int("tag");
 979       if (had_error()) {
 980         return;
 981       }
 982       switch (cp->tag_at(i).value()) {
 983         case JVM_CONSTANT_UnresolvedClass: {
 984           if (tag == JVM_CONSTANT_Class) {
 985             tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
 986             Klass* k = cp->klass_at(i, CHECK);
 987           }
 988           break;
 989         }
 990 
 991         case JVM_CONSTANT_Long:
 992         case JVM_CONSTANT_Double:
 993           parsed_two_word = i + 1;
 994 
 995         case JVM_CONSTANT_ClassIndex:
 996         case JVM_CONSTANT_StringIndex:
 997         case JVM_CONSTANT_String:
 998         case JVM_CONSTANT_UnresolvedClassInError:
 999         case JVM_CONSTANT_Fieldref:
1000         case JVM_CONSTANT_Methodref:
1001         case JVM_CONSTANT_InterfaceMethodref:
1002         case JVM_CONSTANT_NameAndType:
1003         case JVM_CONSTANT_Utf8:
1004         case JVM_CONSTANT_Integer:
1005         case JVM_CONSTANT_Float:
1006         case JVM_CONSTANT_MethodHandle:
1007         case JVM_CONSTANT_MethodType:
1008         case JVM_CONSTANT_Dynamic:
1009         case JVM_CONSTANT_InvokeDynamic:
1010           if (tag != cp->tag_at(i).value()) {

1017           if (tag == JVM_CONSTANT_UnresolvedClass) {
1018             Klass* k = cp->klass_at(i, CHECK);
1019             tty->print_cr("Warning: entry was unresolved in the replay data: %s", k->name()->as_utf8());
1020           } else if (tag != JVM_CONSTANT_Class) {
1021             report_error("Unexpected tag");
1022             return;
1023           }
1024           break;
1025 
1026         case 0:
1027           if (parsed_two_word == i) continue;
1028 
1029         default:
1030           fatal("Unexpected tag: %d", cp->tag_at(i).value());
1031           break;
1032       }
1033 
1034     }
1035   }
1036 
1037   class InlineTypeFieldInitializer : public FieldClosure {
1038     oop _vt;
1039     CompileReplay* _replay;
1040   public:
1041     InlineTypeFieldInitializer(oop vt, CompileReplay* replay)
1042   : _vt(vt), _replay(replay) {}
1043 
1044     void do_field(fieldDescriptor* fd) {
1045       BasicType bt = fd->field_type();
1046       const char* string_value = fd->is_null_free_inline_type() ? nullptr : _replay->parse_escaped_string();
1047       switch (bt) {
1048       case T_BYTE: {
1049         int value = atoi(string_value);
1050         _vt->byte_field_put(fd->offset(), value);
1051         break;
1052       }
1053       case T_BOOLEAN: {
1054         int value = atoi(string_value);
1055         _vt->bool_field_put(fd->offset(), value);
1056         break;
1057       }
1058       case T_SHORT: {
1059         int value = atoi(string_value);
1060         _vt->short_field_put(fd->offset(), value);
1061         break;
1062       }
1063       case T_CHAR: {
1064         int value = atoi(string_value);
1065         _vt->char_field_put(fd->offset(), value);
1066         break;
1067       }
1068       case T_INT: {
1069         int value = atoi(string_value);
1070         _vt->int_field_put(fd->offset(), value);
1071         break;
1072       }
1073       case T_LONG: {
1074         jlong value;
1075         if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1076           fprintf(stderr, "Error parsing long: %s\n", string_value);
1077           break;
1078         }
1079         _vt->long_field_put(fd->offset(), value);
1080         break;
1081       }
1082       case T_FLOAT: {
1083         float value = atof(string_value);
1084         _vt->float_field_put(fd->offset(), value);
1085         break;
1086       }
1087       case T_DOUBLE: {
1088         double value = atof(string_value);
1089         _vt->double_field_put(fd->offset(), value);
1090         break;
1091       }
1092       case T_ARRAY:
1093       case T_OBJECT:
1094       case T_PRIMITIVE_OBJECT:
1095         if (!fd->is_null_free_inline_type()) {
1096           JavaThread* THREAD = JavaThread::current();
1097           bool res = _replay->process_staticfield_reference(string_value, _vt, fd, THREAD);
1098           assert(res, "should succeed for arrays & objects");
1099           break;
1100         } else {
1101           InlineKlass* vk = InlineKlass::cast(fd->field_holder()->get_inline_type_field_klass(fd->index()));
1102           if (fd->is_flat()) {
1103             int field_offset = fd->offset() - vk->first_field_offset();
1104             oop obj = cast_to_oop(cast_from_oop<address>(_vt) + field_offset);
1105             InlineTypeFieldInitializer init_fields(obj, _replay);
1106             vk->do_nonstatic_fields(&init_fields);
1107           } else {
1108             oop value = vk->allocate_instance(JavaThread::current());
1109             _vt->obj_field_put(fd->offset(), value);
1110           }
1111           break;
1112         }
1113       default: {
1114         fatal("Unhandled type: %s", type2name(bt));
1115       }
1116       }
1117     }
1118   };
1119 
1120   bool process_staticfield_reference(const char* field_signature, oop java_mirror, fieldDescriptor* fd, TRAPS) {
1121     if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1122       int length = parse_int("array length");
1123       oop value = nullptr;
1124 
1125       if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1126         // multi dimensional array
1127         Klass* k = resolve_klass(field_signature, CHECK_(true));
1128         ArrayKlass* kelem = (ArrayKlass *)k;


1129         int rank = 0;
1130         while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1131           rank++;
1132         }
1133         jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1134         dims[0] = length;
1135         for (int i = 1; i < rank; i++) {
1136           dims[i] = 1; // These aren't relevant to the compiler
1137         }
1138         value = kelem->multi_allocate(rank, dims, CHECK_(true));
1139       } else {
1140         if (strcmp(field_signature, "[B") == 0) {
1141           value = oopFactory::new_byteArray(length, CHECK_(true));
1142         } else if (strcmp(field_signature, "[Z") == 0) {
1143           value = oopFactory::new_boolArray(length, CHECK_(true));
1144         } else if (strcmp(field_signature, "[C") == 0) {
1145           value = oopFactory::new_charArray(length, CHECK_(true));
1146         } else if (strcmp(field_signature, "[S") == 0) {
1147           value = oopFactory::new_shortArray(length, CHECK_(true));
1148         } else if (strcmp(field_signature, "[F") == 0) {
1149           value = oopFactory::new_floatArray(length, CHECK_(true));
1150         } else if (strcmp(field_signature, "[D") == 0) {
1151           value = oopFactory::new_doubleArray(length, CHECK_(true));
1152         } else if (strcmp(field_signature, "[I") == 0) {
1153           value = oopFactory::new_intArray(length, CHECK_(true));
1154         } else if (strcmp(field_signature, "[J") == 0) {
1155           value = oopFactory::new_longArray(length, CHECK_(true));
1156         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1157                    field_signature[1] == JVM_SIGNATURE_CLASS) {
1158           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1159           parse_klass(CHECK_(true)); // eat up the array class name
1160           value = oopFactory::new_objArray(kelem, length, CHECK_(true));
1161         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1162                    field_signature[1] == JVM_SIGNATURE_PRIMITIVE_OBJECT) {
1163           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1164           parse_klass(CHECK_(true)); // eat up the array class name
1165           value = oopFactory::new_valueArray(kelem, length, CHECK_(true));
1166         } else {
1167           report_error("unhandled array staticfield");
1168         }
1169       }
1170       java_mirror->obj_field_put(fd->offset(), value);
1171       return true;
1172     } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1173       const char* string_value = parse_escaped_string();
1174       Handle value = java_lang_String::create_from_str(string_value, CHECK_(true));
1175       java_mirror->obj_field_put(fd->offset(), value());
1176       return true;
1177     } else if (field_signature[0] == 'L') {
1178       const char* instance = parse_escaped_string();
1179       Klass* k = resolve_klass(instance, CHECK_(true));
1180       oop value = InstanceKlass::cast(k)->allocate_instance(CHECK_(true));
1181       java_mirror->obj_field_put(fd->offset(), value);
1182       return true;
1183     }
1184     return false;
1185   }
1186 
1187   // Initialize a class and fill in the value for a static field.
1188   // This is useful when the compile was dependent on the value of
1189   // static fields but it's impossible to properly rerun the static
1190   // initializer.
1191   void process_staticfield(TRAPS) {
1192     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1193 
1194     if (k == nullptr || ReplaySuppressInitializers == 0 ||
1195         (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1196         skip_remaining();
1197       return;
1198     }
1199 
1200     assert(k->is_initialized(), "must be");
1201 
1202     const char* field_name = parse_escaped_string();
1203     const char* field_signature = parse_string();
1204     fieldDescriptor fd;
1205     Symbol* name = SymbolTable::new_symbol(field_name);
1206     Symbol* sig = SymbolTable::new_symbol(field_signature);
1207     if (!k->find_local_field(name, sig, &fd) ||
1208         !fd.is_static() ||
1209         fd.has_initial_value()) {
1210       report_error(field_name);
1211       return;
1212     }
1213 
1214     oop java_mirror = k->java_mirror();
1215     if (strcmp(field_signature, "I") == 0) {
1216       const char* string_value = parse_escaped_string();
1217       int value = atoi(string_value);
1218       java_mirror->int_field_put(fd.offset(), value);
1219     } else if (strcmp(field_signature, "B") == 0) {
1220       const char* string_value = parse_escaped_string();
1221       int value = atoi(string_value);
1222       java_mirror->byte_field_put(fd.offset(), value);
1223     } else if (strcmp(field_signature, "C") == 0) {
1224       const char* string_value = parse_escaped_string();
1225       int value = atoi(string_value);
1226       java_mirror->char_field_put(fd.offset(), value);
1227     } else if (strcmp(field_signature, "S") == 0) {
1228       const char* string_value = parse_escaped_string();
1229       int value = atoi(string_value);
1230       java_mirror->short_field_put(fd.offset(), value);
1231     } else if (strcmp(field_signature, "Z") == 0) {
1232       const char* string_value = parse_escaped_string();
1233       int value = atoi(string_value);
1234       java_mirror->bool_field_put(fd.offset(), value);
1235     } else if (strcmp(field_signature, "J") == 0) {
1236       const char* string_value = parse_escaped_string();
1237       jlong value;
1238       if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1239         fprintf(stderr, "Error parsing long: %s\n", string_value);
1240         return;
1241       }
1242       java_mirror->long_field_put(fd.offset(), value);
1243     } else if (strcmp(field_signature, "F") == 0) {
1244       const char* string_value = parse_escaped_string();
1245       float value = atof(string_value);
1246       java_mirror->float_field_put(fd.offset(), value);
1247     } else if (strcmp(field_signature, "D") == 0) {
1248       const char* string_value = parse_escaped_string();
1249       double value = atof(string_value);
1250       java_mirror->double_field_put(fd.offset(), value);
1251     } else if (field_signature[0] == JVM_SIGNATURE_PRIMITIVE_OBJECT) {
1252       Klass* kelem = resolve_klass(field_signature, CHECK);
1253       InlineKlass* vk = InlineKlass::cast(kelem);
1254       oop value = vk->allocate_instance(CHECK);
1255       InlineTypeFieldInitializer init_fields(value, this);
1256       vk->do_nonstatic_fields(&init_fields);
1257       java_mirror->obj_field_put(fd.offset(), value);
1258     } else {
1259       bool res = process_staticfield_reference(field_signature, java_mirror, &fd, CHECK);
1260       if (!res)  {



































1261         report_error("unhandled staticfield");
1262       }
1263     }
1264   }
1265 
1266 #if INCLUDE_JVMTI
1267   // JvmtiExport <field> <value>
1268   void process_JvmtiExport(TRAPS) {
1269     const char* field = parse_string();
1270     bool value = parse_int("JvmtiExport flag") != 0;
1271     if (strcmp(field, "can_access_local_variables") == 0) {
1272       JvmtiExport::set_can_access_local_variables(value);
1273     } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1274       JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1275     } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1276       JvmtiExport::set_can_post_on_exceptions(value);
1277     } else {
1278       report_error("Unrecognized JvmtiExport directive");
1279     }
1280   }
< prev index next >