< 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;

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

 981         case JVM_CONSTANT_Long:
 982         case JVM_CONSTANT_Double:
 983           parsed_two_word = i + 1;
 984 
 985         case JVM_CONSTANT_ClassIndex:
 986         case JVM_CONSTANT_StringIndex:
 987         case JVM_CONSTANT_String:
 988         case JVM_CONSTANT_UnresolvedClassInError:
 989         case JVM_CONSTANT_Fieldref:
 990         case JVM_CONSTANT_Methodref:
 991         case JVM_CONSTANT_InterfaceMethodref:
 992         case JVM_CONSTANT_NameAndType:
 993         case JVM_CONSTANT_Utf8:
 994         case JVM_CONSTANT_Integer:
 995         case JVM_CONSTANT_Float:
 996         case JVM_CONSTANT_MethodHandle:
 997         case JVM_CONSTANT_MethodType:
 998         case JVM_CONSTANT_Dynamic:
 999         case JVM_CONSTANT_InvokeDynamic:
1000           if (tag != cp->tag_at(i).value()) {

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




















































1054     }

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




1100           } else {
1101             report_error("unhandled array staticfield");
1102           }
1103         }














1104       }












































































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

  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;

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

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


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






































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