< prev index next >

src/hotspot/share/ci/ciReplay.cpp

Print this page




 915         } else if (strcmp(field_signature, "[J") == 0) {
 916           value = oopFactory::new_longArray(length, CHECK_(true));
 917         } else if (field_signature[0] == '[' && field_signature[1] == 'L') {
 918           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
 919           value = oopFactory::new_objArray(kelem, length, CHECK_(true));
 920         } else if (field_signature[0] == '[' && field_signature[1] == 'Q') {
 921           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
 922           value = oopFactory::new_valueArray(kelem, length, CHECK_(true));
 923         } else {
 924           report_error("unhandled array staticfield");
 925         }
 926       }
 927       java_mirror->obj_field_put(fd->offset(), value);
 928       return true;
 929     } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
 930       const char* string_value = parse_escaped_string();
 931       Handle value = java_lang_String::create_from_str(string_value, CHECK_(true));
 932       java_mirror->obj_field_put(fd->offset(), value());
 933       return true;
 934     } else if (field_signature[0] == 'L') {
 935       Klass* k = resolve_klass(field_signature, CHECK_(true));

 936       oop value = InstanceKlass::cast(k)->allocate_instance(CHECK_(true));
 937       java_mirror->obj_field_put(fd->offset(), value);
 938       return true;
 939     }
 940     return false;
 941   }
 942 
 943   // Initialize a class and fill in the value for a static field.
 944   // This is useful when the compile was dependent on the value of
 945   // static fields but it's impossible to properly rerun the static
 946   // initializer.
 947   void process_staticfield(TRAPS) {
 948     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
 949 
 950     if (k == NULL || ReplaySuppressInitializers == 0 ||
 951         (ReplaySuppressInitializers == 2 && k->class_loader() == NULL)) {
 952       return;
 953     }
 954 
 955     assert(k->is_initialized(), "must be");




 915         } else if (strcmp(field_signature, "[J") == 0) {
 916           value = oopFactory::new_longArray(length, CHECK_(true));
 917         } else if (field_signature[0] == '[' && field_signature[1] == 'L') {
 918           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
 919           value = oopFactory::new_objArray(kelem, length, CHECK_(true));
 920         } else if (field_signature[0] == '[' && field_signature[1] == 'Q') {
 921           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
 922           value = oopFactory::new_valueArray(kelem, length, CHECK_(true));
 923         } else {
 924           report_error("unhandled array staticfield");
 925         }
 926       }
 927       java_mirror->obj_field_put(fd->offset(), value);
 928       return true;
 929     } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
 930       const char* string_value = parse_escaped_string();
 931       Handle value = java_lang_String::create_from_str(string_value, CHECK_(true));
 932       java_mirror->obj_field_put(fd->offset(), value());
 933       return true;
 934     } else if (field_signature[0] == 'L') {
 935       const char* instance = parse_escaped_string();
 936       Klass* k = resolve_klass(instance, CHECK_(true));
 937       oop value = InstanceKlass::cast(k)->allocate_instance(CHECK_(true));
 938       java_mirror->obj_field_put(fd->offset(), value);
 939       return true;
 940     }
 941     return false;
 942   }
 943 
 944   // Initialize a class and fill in the value for a static field.
 945   // This is useful when the compile was dependent on the value of
 946   // static fields but it's impossible to properly rerun the static
 947   // initializer.
 948   void process_staticfield(TRAPS) {
 949     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
 950 
 951     if (k == NULL || ReplaySuppressInitializers == 0 ||
 952         (ReplaySuppressInitializers == 2 && k->class_loader() == NULL)) {
 953       return;
 954     }
 955 
 956     assert(k->is_initialized(), "must be");


< prev index next >