src/share/vm/classfile/classFileParser.cpp

Print this page




4291     // Obtain j.l.r.Module
4292     oop module_jlrM = (oop)NULL;
4293     if (module_entry->is_named() &&
4294         module_entry->jlrM_module() != NULL) {
4295       module_jlrM = JNIHandles::resolve(module_entry->jlrM_module());
4296     }
4297     Handle jlrM_handle(THREAD, module_jlrM);
4298 
4299     // Allocate mirror and initialize static fields
4300     java_lang_Class::create_mirror(this_klass, class_loader, jlrM_handle, protection_domain,
4301                                    CHECK_(nullHandle));
4302 
4303     // Generate any default methods - default methods are interface methods
4304     // that have a default implementation.  This is new with Lambda project.
4305     if (has_default_methods ) {
4306       DefaultMethods::generate_default_methods(
4307           this_klass(), &all_mirandas, CHECK_(nullHandle));
4308     }
4309 
4310     // Add read edges to the unnamed modules of the bootstrap and app class loaders.
4311     if (cf_changed_in_CFLH && !jlrM_handle.is_null() && module_entry->is_named()) {



4312       JvmtiExport::add_default_read_edges(jlrM_handle, THREAD);
4313     }

4314 
4315     // Update the loader_data graph.
4316     record_defined_class_dependencies(this_klass, CHECK_NULL);
4317 
4318     ClassLoadingService::notify_class_loaded(InstanceKlass::cast(this_klass()),
4319                                              false /* not shared class */);
4320 
4321     if (TraceClassLoading) {
4322       ResourceMark rm;
4323       // print in a single call to reduce interleaving of output
4324       if (cfs->source() != NULL) {
4325         static const size_t boot_image_name_len = strlen(BOOT_IMAGE_NAME);
4326         size_t cfs_len = strlen(cfs->source());
4327         ModuleEntry* module_entry = this_klass->module();
4328         assert(module_entry != NULL, "module_entry should always be set");
4329         // See if cfs->source() ends in "bootmodules.jimage"
4330         if (module_entry->is_named() && boot_image_name_len < cfs_len &&
4331           (strncmp(cfs->source() + cfs_len - boot_image_name_len,
4332                   BOOT_IMAGE_NAME, boot_image_name_len) == 0)) {
4333           tty->print_cr("[Loaded %s from jrt:/%s]", this_klass->external_name(),




4291     // Obtain j.l.r.Module
4292     oop module_jlrM = (oop)NULL;
4293     if (module_entry->is_named() &&
4294         module_entry->jlrM_module() != NULL) {
4295       module_jlrM = JNIHandles::resolve(module_entry->jlrM_module());
4296     }
4297     Handle jlrM_handle(THREAD, module_jlrM);
4298 
4299     // Allocate mirror and initialize static fields
4300     java_lang_Class::create_mirror(this_klass, class_loader, jlrM_handle, protection_domain,
4301                                    CHECK_(nullHandle));
4302 
4303     // Generate any default methods - default methods are interface methods
4304     // that have a default implementation.  This is new with Lambda project.
4305     if (has_default_methods ) {
4306       DefaultMethods::generate_default_methods(
4307           this_klass(), &all_mirandas, CHECK_(nullHandle));
4308     }
4309 
4310     // Add read edges to the unnamed modules of the bootstrap and app class loaders.
4311     if (cf_changed_in_CFLH && !jlrM_handle.is_null() && module_entry->is_named() &&
4312         !module_entry->has_default_read_edges()) {
4313       if (!module_entry->set_has_default_read_edges()) {
4314         // We won a potential race
4315         JvmtiExport::add_default_read_edges(jlrM_handle, THREAD);
4316       }
4317     }
4318 
4319     // Update the loader_data graph.
4320     record_defined_class_dependencies(this_klass, CHECK_NULL);
4321 
4322     ClassLoadingService::notify_class_loaded(InstanceKlass::cast(this_klass()),
4323                                              false /* not shared class */);
4324 
4325     if (TraceClassLoading) {
4326       ResourceMark rm;
4327       // print in a single call to reduce interleaving of output
4328       if (cfs->source() != NULL) {
4329         static const size_t boot_image_name_len = strlen(BOOT_IMAGE_NAME);
4330         size_t cfs_len = strlen(cfs->source());
4331         ModuleEntry* module_entry = this_klass->module();
4332         assert(module_entry != NULL, "module_entry should always be set");
4333         // See if cfs->source() ends in "bootmodules.jimage"
4334         if (module_entry->is_named() && boot_image_name_len < cfs_len &&
4335           (strncmp(cfs->source() + cfs_len - boot_image_name_len,
4336                   BOOT_IMAGE_NAME, boot_image_name_len) == 0)) {
4337           tty->print_cr("[Loaded %s from jrt:/%s]", this_klass->external_name(),