mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8176472: Lazily create ModuleEntryTable
Moved the unnamed module out of the ModuleEntryTable and into the ClassLoaderData so that the MET can be lazily created only when other modules are present. Also a smaller PackageTable size. Reviewed-by: gtriantafill, hseigel, lfoltan, coleenp
This commit is contained in:
parent
2327609d91
commit
ca72444bf9
9 changed files with 112 additions and 57 deletions
|
@ -478,13 +478,11 @@ void Modules::set_bootloader_unnamed_module(jobject module, TRAPS) {
|
|||
|
||||
log_debug(modules)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");
|
||||
|
||||
// Ensure the boot loader's PackageEntryTable has been created
|
||||
ModuleEntryTable* module_table = get_module_entry_table(h_loader, CHECK);
|
||||
|
||||
// Set java.lang.reflect.Module for the boot loader's unnamed module
|
||||
ModuleEntry* unnamed_module = module_table->unnamed_module();
|
||||
// Set java.lang.Module for the boot loader's unnamed module
|
||||
ClassLoaderData* boot_loader_data = ClassLoaderData::the_null_class_loader_data();
|
||||
ModuleEntry* unnamed_module = boot_loader_data->unnamed_module();
|
||||
assert(unnamed_module != NULL, "boot loader's unnamed ModuleEntry not defined");
|
||||
unnamed_module->set_module(ClassLoaderData::the_null_class_loader_data()->add_handle(module_handle));
|
||||
unnamed_module->set_module(boot_loader_data->add_handle(module_handle));
|
||||
// Store pointer to the ModuleEntry in the unnamed module's java.lang.reflect.Module object.
|
||||
java_lang_reflect_Module::set_module_entry(module_handle(), unnamed_module);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue