6038 // Allocate mirror and initialize static fields
6039 // The create_mirror() call will also call compute_modifiers()
6040 java_lang_Class::create_mirror(ik,
6041 Handle(THREAD, _loader_data->class_loader()),
6042 module_handle,
6043 _protection_domain,
6044 CHECK);
6045
6046 assert(_all_mirandas != NULL, "invariant");
6047
6048 // Generate any default methods - default methods are public interface methods
6049 // that have a default implementation. This is new with Java 8.
6050 if (_has_nonstatic_concrete_methods) {
6051 DefaultMethods::generate_default_methods(ik,
6052 _all_mirandas,
6053 CHECK);
6054 }
6055
6056 if (is_value_type()) {
6057 ValueKlass* vk = ValueKlass::cast(ik);
6058 vk->set_if_bufferable();
6059 vk->initialize_calling_convention();
6060 }
6061
6062 // Add read edges to the unnamed modules of the bootstrap and app class loaders.
6063 if (changed_by_loadhook && !module_handle.is_null() && module_entry->is_named() &&
6064 !module_entry->has_default_read_edges()) {
6065 if (!module_entry->set_has_default_read_edges()) {
6066 // We won a potential race
6067 JvmtiExport::add_default_read_edges(module_handle, THREAD);
6068 }
6069 }
6070
6071 int nfields = ik->java_fields_count();
6072 if (ik->is_value()) nfields++;
6073 for(int i = 0; i < nfields; i++) {
6074 if (ik->field_access_flags(i) & JVM_ACC_FLATTENABLE) {
6075 Klass* klass = SystemDictionary::resolve_or_fail(ik->field_signature(i),
6076 Handle(THREAD, ik->class_loader()),
6077 Handle(THREAD, ik->protection_domain()), true, CHECK);
6078 assert(klass != NULL, "Sanity check");
|
6038 // Allocate mirror and initialize static fields
6039 // The create_mirror() call will also call compute_modifiers()
6040 java_lang_Class::create_mirror(ik,
6041 Handle(THREAD, _loader_data->class_loader()),
6042 module_handle,
6043 _protection_domain,
6044 CHECK);
6045
6046 assert(_all_mirandas != NULL, "invariant");
6047
6048 // Generate any default methods - default methods are public interface methods
6049 // that have a default implementation. This is new with Java 8.
6050 if (_has_nonstatic_concrete_methods) {
6051 DefaultMethods::generate_default_methods(ik,
6052 _all_mirandas,
6053 CHECK);
6054 }
6055
6056 if (is_value_type()) {
6057 ValueKlass* vk = ValueKlass::cast(ik);
6058 vk->initialize_calling_convention();
6059 }
6060
6061 // Add read edges to the unnamed modules of the bootstrap and app class loaders.
6062 if (changed_by_loadhook && !module_handle.is_null() && module_entry->is_named() &&
6063 !module_entry->has_default_read_edges()) {
6064 if (!module_entry->set_has_default_read_edges()) {
6065 // We won a potential race
6066 JvmtiExport::add_default_read_edges(module_handle, THREAD);
6067 }
6068 }
6069
6070 int nfields = ik->java_fields_count();
6071 if (ik->is_value()) nfields++;
6072 for(int i = 0; i < nfields; i++) {
6073 if (ik->field_access_flags(i) & JVM_ACC_FLATTENABLE) {
6074 Klass* klass = SystemDictionary::resolve_or_fail(ik->field_signature(i),
6075 Handle(THREAD, ik->class_loader()),
6076 Handle(THREAD, ik->protection_domain()), true, CHECK);
6077 assert(klass != NULL, "Sanity check");
|