4949
5050ModuleEntry* ModuleEntryTable::_javabase_module = nullptr ;
5151
52- oop ModuleEntry::module () const { return _module .resolve (); }
52+ oop ModuleEntry::module_oop () const { return _module_handle .resolve (); }
5353
5454void ModuleEntry::set_location (Symbol* location) {
5555 // _location symbol's refcounts are managed by ModuleEntry,
@@ -284,7 +284,7 @@ ModuleEntry::ModuleEntry(Handle module_handle,
284284 }
285285
286286 if (!module_handle.is_null ()) {
287- _module = loader_data->add_handle (module_handle);
287+ _module_handle = loader_data->add_handle (module_handle);
288288 }
289289
290290 set_version (version);
@@ -401,7 +401,7 @@ ModuleEntry* ModuleEntry::allocate_archived_entry() const {
401401 memcpy ((void *)archived_entry, (void *)this , sizeof (ModuleEntry));
402402
403403 if (CDSConfig::is_dumping_full_module_graph ()) {
404- archived_entry->_archived_module_index = HeapShared::append_root (module ());
404+ archived_entry->_archived_module_index = HeapShared::append_root (module_oop ());
405405 } else {
406406 archived_entry->_archived_module_index = -1 ;
407407 }
@@ -422,7 +422,7 @@ ModuleEntry* ModuleEntry::allocate_archived_entry() const {
422422
423423 // Clear handles and restore at run time. Handles cannot be archived.
424424 OopHandle null_handle;
425- archived_entry->_module = null_handle;
425+ archived_entry->_module_handle = null_handle;
426426
427427 // For verify_archived_module_entries()
428428 DEBUG_ONLY (_num_inited_module_entries++);
@@ -526,7 +526,7 @@ void ModuleEntry::restore_archived_oops(ClassLoaderData* loader_data) {
526526 assert (CDSConfig::is_using_archive (), " runtime only" );
527527 Handle module_handle (Thread::current (), HeapShared::get_root (_archived_module_index, /* clear=*/ true ));
528528 assert (module_handle.not_null (), " huh" );
529- set_module (loader_data->add_handle (module_handle));
529+ set_module_handle (loader_data->add_handle (module_handle));
530530
531531 // This was cleared to zero during dump time -- we didn't save the value
532532 // because it may be affected by archive relocation.
@@ -662,7 +662,7 @@ void ModuleEntryTable::finalize_javabase(Handle module_handle, Symbol* version,
662662 jb_module->set_location (location);
663663 // Once java.base's ModuleEntry _module field is set with the known
664664 // java.lang.Module, java.base is considered "defined" to the VM.
665- jb_module->set_module (boot_loader_data->add_handle (module_handle));
665+ jb_module->set_module_handle (boot_loader_data->add_handle (module_handle));
666666
667667 // Store pointer to the ModuleEntry for java.base in the java.lang.Module object.
668668 java_lang_Module::set_module_entry (module_handle (), jb_module);
@@ -700,7 +700,7 @@ void ModuleEntryTable::patch_javabase_entries(JavaThread* current, Handle module
700700 // We allow -XX:ArchiveHeapTestClass to archive additional classes
701701 // into the CDS heap, but these must be in the unnamed module.
702702 ModuleEntry* unnamed_module = ClassLoaderData::the_null_class_loader_data ()->unnamed_module ();
703- Handle unnamed_module_handle (current, unnamed_module->module ());
703+ Handle unnamed_module_handle (current, unnamed_module->module_oop ());
704704 java_lang_Class::fixup_module_field (k, unnamed_module_handle);
705705 } else
706706#endif
@@ -745,7 +745,7 @@ void ModuleEntry::print(outputStream* st) {
745745 st->print_cr (" entry " PTR_FORMAT " name %s module " PTR_FORMAT " loader %s version %s location %s strict %s" ,
746746 p2i (this ),
747747 name_as_C_string (),
748- p2i (module ()),
748+ p2i (module_oop ()),
749749 loader_data ()->loader_name_and_id (),
750750 version () != nullptr ? version ()->as_C_string () : " nullptr" ,
751751 location () != nullptr ? location ()->as_C_string () : " nullptr" ,
0 commit comments