This commit is contained in:
Jesper Wilhelmsson 2017-04-18 22:25:33 +02:00
commit d507b8945c
658 changed files with 7673 additions and 3278 deletions

View file

@ -235,7 +235,7 @@ ModuleEntry* ModuleEntry::create_unnamed_module(ClassLoaderData* cld) {
// Store pointer to the ModuleEntry in the unnamed module's java.lang.Module
// object.
java_lang_reflect_Module::set_module_entry(module, unnamed_module);
java_lang_Module::set_module_entry(module, unnamed_module);
return unnamed_module;
}
@ -424,27 +424,27 @@ void ModuleEntryTable::finalize_javabase(Handle module_handle, Symbol* version,
fatal("Unable to finalize module definition for " JAVA_BASE_NAME);
}
// Set java.lang.reflect.Module, version and location for java.base
// Set java.lang.Module, version and location for java.base
ModuleEntry* jb_module = javabase_moduleEntry();
assert(jb_module != NULL, JAVA_BASE_NAME " ModuleEntry not defined");
jb_module->set_version(version);
jb_module->set_location(location);
// Once java.base's ModuleEntry _module field is set with the known
// java.lang.reflect.Module, java.base is considered "defined" to the VM.
// java.lang.Module, java.base is considered "defined" to the VM.
jb_module->set_module(boot_loader_data->add_handle(module_handle));
// Store pointer to the ModuleEntry for java.base in the java.lang.reflect.Module object.
java_lang_reflect_Module::set_module_entry(module_handle(), jb_module);
// Store pointer to the ModuleEntry for java.base in the java.lang.Module object.
java_lang_Module::set_module_entry(module_handle(), jb_module);
}
// Within java.lang.Class instances there is a java.lang.reflect.Module field
// that must be set with the defining module. During startup, prior to java.base's
// definition, classes needing their module field set are added to the fixup_module_list.
// Their module field is set once java.base's java.lang.reflect.Module is known to the VM.
// Within java.lang.Class instances there is a java.lang.Module field that must
// be set with the defining module. During startup, prior to java.base's definition,
// classes needing their module field set are added to the fixup_module_list.
// Their module field is set once java.base's java.lang.Module is known to the VM.
void ModuleEntryTable::patch_javabase_entries(Handle module_handle) {
if (module_handle.is_null()) {
fatal("Unable to patch the module field of classes loaded prior to "
JAVA_BASE_NAME "'s definition, invalid java.lang.reflect.Module");
JAVA_BASE_NAME "'s definition, invalid java.lang.Module");
}
// Do the fixups for the basic primitive types