8253496: [BACKOUT] JDK-8253208 Move CDS related code to a separate class

Reviewed-by: eosterlund, dcubed
This commit is contained in:
Ioi Lam 2020-09-22 20:15:01 +00:00
parent 581f0f2643
commit 65af837391
22 changed files with 99 additions and 103 deletions

View file

@ -37,7 +37,7 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.CDS;
import jdk.internal.misc.VM;
import jdk.internal.vm.annotation.Stable;
/**
@ -76,7 +76,7 @@ class ImmutableCollections {
// derived from the JVM build/version, so can we generate the exact same
// CDS archive for the same JDK build. This makes it possible to verify the
// consistency of the JDK build.
long seed = CDS.getRandomSeedForDumping();
long seed = VM.getRandomSeedForCDSDump();
if (seed == 0) {
seed = System.nanoTime();
}
@ -100,7 +100,7 @@ class ImmutableCollections {
static final MapN<?,?> EMPTY_MAP;
static {
CDS.initializeFromArchive(ImmutableCollections.class);
VM.initializeFromArchive(ImmutableCollections.class);
if (archivedObjects == null) {
EMPTY = new Object();
EMPTY_LIST = new ListN<>();