mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8207263: Store the Configuration for system modules into CDS archive
Archive boot layer Configuration. Reviewed-by: redestad, iklam, ccheung
This commit is contained in:
parent
5858a507f4
commit
a5d14313f5
13 changed files with 353 additions and 45 deletions
|
@ -41,8 +41,10 @@ import java.util.Set;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
import jdk.internal.module.ModuleReferenceImpl;
|
||||
import jdk.internal.module.ModuleTarget;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
/**
|
||||
* A configuration that is the result of <a href="package-summary.html#resolution">
|
||||
|
@ -103,7 +105,17 @@ import jdk.internal.module.ModuleTarget;
|
|||
public final class Configuration {
|
||||
|
||||
// @see Configuration#empty()
|
||||
private static final Configuration EMPTY_CONFIGURATION = new Configuration();
|
||||
// EMPTY_CONFIGURATION may be initialized from the CDS archive.
|
||||
private static @Stable Configuration EMPTY_CONFIGURATION;
|
||||
|
||||
static {
|
||||
// Initialize EMPTY_CONFIGURATION from the archive.
|
||||
VM.initializeFromArchive(Configuration.class);
|
||||
// Create a new empty Configuration if there is no archived version.
|
||||
if (EMPTY_CONFIGURATION == null) {
|
||||
EMPTY_CONFIGURATION = new Configuration();
|
||||
}
|
||||
}
|
||||
|
||||
// parent configurations, in search order
|
||||
private final List<Configuration> parents;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue