Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-53528] Update labsjdk to 23+21-jvmci-b01 #8805

Merged
merged 67 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
bfef63f
update galahad-jdk to 23+18
zapster Apr 16, 2024
dfc4f3d
compiler/ci: exclude JVMCI_VERSION_CHECK=strict gate on galahad
zapster Apr 16, 2024
54d116f
Automatic merge of master into galahad
OracleLabsAutomation Apr 16, 2024
a808bed
Automatic merge of master into galahad
OracleLabsAutomation Apr 16, 2024
99df533
[GR-53458] Disable JVMCIVersionCheck for galahad builds
zapster Apr 16, 2024
0ab1305
Automatic merge of master into galahad
OracleLabsAutomation Apr 16, 2024
f9af59e
Automatic merge of master into galahad
OracleLabsAutomation Apr 17, 2024
abf610e
Automatic merge of master into galahad
OracleLabsAutomation Apr 17, 2024
4be984d
Automatic merge of master into galahad
OracleLabsAutomation Apr 17, 2024
1a50f05
Automatic merge of master into galahad
OracleLabsAutomation Apr 17, 2024
48d840d
Automatic merge of master into galahad
OracleLabsAutomation Apr 17, 2024
cf8903f
Automatic merge of master into galahad
OracleLabsAutomation Apr 18, 2024
634d806
Automatic merge of master into galahad
OracleLabsAutomation Apr 18, 2024
30601bb
Automatic merge of master into galahad
OracleLabsAutomation Apr 18, 2024
5775d70
update galahad-jdk to jdk-23+19-1554
dougxc Apr 18, 2024
9778678
removed references to classes removed by JDK-8329949
dougxc Apr 18, 2024
6d4b3d7
[GR-53504] Adapt to JDK-8329949.
dougxc Apr 18, 2024
21fd70e
Automatic merge of master into galahad
OracleLabsAutomation Apr 18, 2024
189b658
update JVMCI to 23+19-jvmci-b01
OracleLabsAutomation Apr 18, 2024
f63c8d3
deploy snapshots
marwan-hallaoui Apr 18, 2024
35e3449
Merge in galahad
marwan-hallaoui Apr 18, 2024
3a75699
Automatic merge of master into galahad
OracleLabsAutomation Apr 19, 2024
502391c
Automatic merge of master into galahad
OracleLabsAutomation Apr 19, 2024
9e32f2d
Automatic merge of master into galahad
OracleLabsAutomation Apr 19, 2024
59d9e83
compiler: use factory methods in JVMCIVersionCheck
zapster Apr 19, 2024
6d8940b
compiler: force factory methods for JVMCIVersionCheck
zapster Apr 19, 2024
113fb85
Merge with master
zapster Apr 19, 2024
0d392c6
Automatic merge of master into galahad
OracleLabsAutomation Apr 19, 2024
5945166
adopt "JDK-8317376: Minor improvements to the this escape analyzer"
zapster Apr 19, 2024
1e5c22e
Automatic merge of master into galahad
OracleLabsAutomation Apr 19, 2024
d577f2c
Automatic merge of master into galahad
OracleLabsAutomation Apr 20, 2024
6ba8c20
Automatic merge of master into galahad
OracleLabsAutomation Apr 20, 2024
deba9d4
Automatic merge of master into galahad
OracleLabsAutomation Apr 21, 2024
c6bb472
Automatic merge of master into galahad
OracleLabsAutomation Apr 22, 2024
132c86c
Automatic merge of master into galahad
OracleLabsAutomation Apr 22, 2024
b895946
Automatic merge of master into galahad
OracleLabsAutomation Apr 23, 2024
f5b15f9
Automatic merge of master into galahad
OracleLabsAutomation Apr 23, 2024
2524086
Automatic merge of master into galahad
OracleLabsAutomation Apr 23, 2024
8617dde
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
84560c3
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
0a16822
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
d2d19c7
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
1430d1f
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
9e320bc
adapt to "JDK-8329593: Drop adjustments to target parallelism when vi…
dougxc Apr 24, 2024
84fd5a3
adopt "JDK-8317376: Minor improvements to the this escape analyzer"
zapster Apr 19, 2024
433532d
adapt to "JDK-8329331: Intrinsify Unsafe::setMemory"
dougxc Apr 24, 2024
17feeca
Automatic merge of master into galahad
OracleLabsAutomation Apr 24, 2024
694a33a
[GR-53629] Adapt to "JDK-8329593: Drop adjustments to target parallel…
dougxc Apr 24, 2024
febdf17
Automatic merge of master into galahad
OracleLabsAutomation Apr 25, 2024
88d3227
Automatic merge of master into galahad
OracleLabsAutomation Apr 25, 2024
f59f19f
Automatic merge of master into galahad
OracleLabsAutomation Apr 25, 2024
50e5e2e
Automatic merge of master into galahad
OracleLabsAutomation Apr 25, 2024
7bda957
Automatic merge of master into galahad
OracleLabsAutomation Apr 26, 2024
f1cbf30
Automatic merge of master into galahad
OracleLabsAutomation Apr 26, 2024
bec68ef
Automatic merge of master into galahad
OracleLabsAutomation Apr 26, 2024
f69d12a
Automatic merge of master into galahad
OracleLabsAutomation Apr 27, 2024
ac8d085
Automatic merge of master into galahad
OracleLabsAutomation Apr 28, 2024
1c25122
Automatic merge of master into galahad
OracleLabsAutomation Apr 28, 2024
6789047
Automatic merge of master into galahad
OracleLabsAutomation Apr 30, 2024
486948f
Automatic merge of master into galahad
OracleLabsAutomation Apr 30, 2024
837d403
Automatic merge of master into galahad
OracleLabsAutomation Apr 30, 2024
3db816f
update labsjdk to 23+21-jvmci-b01
marwan-hallaoui Apr 25, 2024
579c71a
Merge with master
zapster May 3, 2024
b9b05c9
Merge with galahad
zapster May 3, 2024
119c2fb
adopt "JDK-8303689: javac -Xlint could/should report on "dangling" do…
zapster May 3, 2024
b696a77
Merge remote-tracking branch 'origin/master' into labsjdk/automation-…
dougxc May 9, 2024
a008fe0
remove text after version in @since tag
dougxc May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+16-1220", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+20-1618", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "jdk-11.0.11+9", "platformspecific": true, "extrabundles": ["static-libs"] },

Expand Down Expand Up @@ -44,13 +44,13 @@
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+18", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+21", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
2 changes: 1 addition & 1 deletion compiler/ci/ci_common/gate.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
JVMCI_VERSION_CHECK: "strict",
},
}],
local jdk_latest_version_check_builds = [self.make_build(self.jdk_latest, "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + {
local jdk_latest_version_check_builds = [self.make_build(self.jdk_latest, "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + galahad.exclude {
environment+: {
# Run the strict JVMCI version check, i.e., that JVMCIVersionCheck.JVMCI_MIN_VERSION matches the versions in common.json.
JVMCI_VERSION_CHECK: "strict",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@
*/
package jdk.graal.compiler.microbenchmarks.graal;

import jdk.graal.compiler.microbenchmarks.graal.util.GraalState;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Warmup;

@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
import jdk.graal.compiler.microbenchmarks.graal.util.GraalState;

/**
* This dummy class is used to verify that the JMH microbenchmarking environment is set up properly.
*/
@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
public class TestJMHWhitebox extends GraalBenchmark {

@Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;

import jdk.graal.compiler.core.common.util.CompilationAlarm;
import jdk.graal.compiler.graph.Node;
import jdk.graal.compiler.graph.NodeClass;
Expand Down Expand Up @@ -84,7 +85,7 @@ public NodesState() {
public final Node[] valueNumberableLeafNodes;
public final NodePair[] valueEqualsNodePairs;

public final class NodePair {
public static final class NodePair {
public final Node n1;
public final Node n2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@
*/
package jdk.graal.compiler.debug.test;

import jdk.graal.compiler.debug.GraalError;
import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.debug.GraalError;

public class GraalErrorTest {

@FunctionalInterface
interface Error {
void call();
}

@Test
/**
* Test that the errors actually fail and provide the correct message.
*/
@Test
public void testErrors() {
error("unimplemented: test", () -> GraalError.unimplemented("test"));
error("unimplemented override", () -> GraalError.unimplementedOverride());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
import static jdk.graal.compiler.test.GraalTest.assertFalse;
import static jdk.graal.compiler.test.GraalTest.assertTrue;

import org.junit.Test;

import jdk.graal.compiler.core.common.type.IntegerStamp;
import jdk.graal.compiler.core.common.type.Stamp;
import jdk.graal.compiler.graph.test.GraphTest;
import jdk.graal.compiler.nodes.type.StampTool;
import org.junit.Test;

public class StampToolTest extends GraphTest {

Expand Down Expand Up @@ -66,10 +67,10 @@ public void testStampToolUnsignedCompare() {
assertTrue(StampTool.unsignedCompare(stamp2, stamp1) == null);
}

@Test
/**
* Tests certain paths not reached by other testing.
*/
@Test
public void testStampToolPaths() {
Stamp stamp1 = stampForTrailingZeros(forInt(0));
assertFalse(StampTool.isAlwaysArray(stamp1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* questions.
*/

/**
/*
* @test
* @run junit jdk.vm.ci.options.test.NestedBooleanOptionKeyTest
*/
Expand All @@ -39,13 +39,14 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.options.NestedBooleanOptionKey;
import jdk.graal.compiler.options.OptionDescriptor;
import jdk.graal.compiler.options.OptionKey;
import jdk.graal.compiler.options.OptionType;
import jdk.graal.compiler.options.OptionValues;
import org.junit.Assert;
import org.junit.Test;

public class NestedBooleanOptionKeyTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ public final int hashCode() {
return id;
}

/**
/*
* Do not overwrite the equality test of a node in subclasses. Equality tests must rely solely
* on identity.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @param <G> the type of graph this instance handles
* @param <M> the type of methods this instance handles
* @since 19.0 a {@link WritableByteChannel} is implemented
* @since 19.0
*/
public final class GraphOutput<G, M> implements Closeable, WritableByteChannel {
private final GraphProtocol<G, ?, ?, ?, ?, M, ?, ?, ?, ?> printer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public final class JVMCIVersionCheck {
* default/fallback entry.
*/
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
"21", Map.of(DEFAULT_VENDOR_ENTRY, new Version(23, 1, 33)),
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
"23", Map.of(
"Oracle Corporation", new Version("23+18", 1),
DEFAULT_VENDOR_ENTRY, new Version("23+18", 1)));
"Oracle Corporation", createLabsJDKVersion("23+21", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+21", 1)));
private static final int NA = 0;
/**
* Minimum Java release supported by Graal.
Expand All @@ -68,7 +68,7 @@ public final class JVMCIVersionCheck {
* JVMCI build number.
*/
public static Version createLabsJDKVersion(String jdkVersionString, int jvmciBuild) {
return new Version(jdkVersionString, jvmciBuild);
return new Version(jdkVersionString, NA, NA, jvmciBuild, false, false);
}

/**
Expand All @@ -77,15 +77,15 @@ public static Version createLabsJDKVersion(String jdkVersionString, int jvmciBui
* custom LabsJDK build.
*/
public static Version createOpenJDKVersion(String jdkVersionString) {
return new Version(jdkVersionString);
return new Version(jdkVersionString, NA, NA, NA, false, true);
}

/**
* Legacy factory for versions without JDK version. This force sets {@link Version#jdkVersion}
* to {@code 21}. While this is not entirely correct, it works for our purposes.
*/
public static Version createLegacyVersion(int jvmciMajor, int jvmciMinor, int jvmciBuild) {
return new Version(jvmciMajor, jvmciMinor, jvmciBuild);
return new Version("21", jvmciMajor, jvmciMinor, jvmciBuild, true, false);
}

public static final class Version {
Expand Down Expand Up @@ -141,18 +141,6 @@ private static String stripVersion(Runtime.Version rv) {
return sb.toString();
}

private Version(String jdkVersionString, int jvmciBuild) {
this(jdkVersionString, NA, NA, jvmciBuild, false, false);
}

private Version(String jdkVersionString) {
this(jdkVersionString, NA, NA, NA, false, true);
}

private Version(int jvmciMajor, int jvmciMinor, int jvmciBuild) {
this("21", jvmciMajor, jvmciMinor, jvmciBuild, true, false);
}

private Version(String jdkVersionString, int jvmciMajor, int jvmciMinor, int jvmciBuild, boolean legacy, boolean isOpenJDK) {
this(Runtime.Version.parse(jdkVersionString), jvmciMajor, jvmciMinor, jvmciBuild, legacy, isOpenJDK);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ public UnimplementedGraalIntrinsics(Architecture arch) {
// JDK-8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (GR-48679)
"java/util/DualPivotQuicksort.partition(Ljava/lang/Class;Ljava/lang/Object;JIIIILjava/util/DualPivotQuicksort$PartitionOperation;)[I",
"java/util/DualPivotQuicksort.sort(Ljava/lang/Class;Ljava/lang/Object;JIILjava/util/DualPivotQuicksort$SortOperation;)V",
// JDK-8329331: Intrinsify Unsafe::setMemory
"jdk/internal/misc/Unsafe.setMemory0(Ljava/lang/Object;JJB)V",
// JDK-8223347: Integration of Vector API
"jdk/internal/vm/vector/VectorSupport.compressExpandOp(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$CompressExpandOperation;)Ljdk/internal/vm/vector/VectorSupport$VectorPayload;",
jdk == 21 ? "jdk/internal/vm/vector/VectorSupport.extract(Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;ILjdk/internal/vm/vector/VectorSupport$VecExtractOp;)J":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ValueNode extremumNode() {
*/
public abstract void deleteUnusedNodes();

/**
/*
* Range check predication support.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Warmup;

@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
/**
* This dummy class is used to verify that the JMH microbenchmarking environment is set up properly.
*/
@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
public class TestJMHBlackbox {

@Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum IMAGE_FILE_HEADER {

static int totalsize = 20;

/**
/*
* IMAGE_FILE_HEADER defines
*/

Expand Down Expand Up @@ -94,7 +94,7 @@ enum IMAGE_SECTION_HEADER {

static int totalsize = 40;

/**
/*
* IMAGE_SECTION_HEADER defines
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@

package com.oracle.svm.core;

import com.oracle.svm.core.heap.ReferenceInternals;
import jdk.graal.compiler.core.common.SuppressFBWarnings;

import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.AbstractCollection;
Expand All @@ -50,8 +47,12 @@
import java.util.function.BiFunction;
import java.util.function.Consumer;

import com.oracle.svm.core.heap.ReferenceInternals;

/**
import jdk.graal.compiler.core.common.SuppressFBWarnings;


/*
* Hash table based implementation of the <tt>Map</tt> interface, with
* <em>weak keys</em>.
* An entry in a <tt>WeakHashMap</tt> will automatically be removed when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.RuntimeReflection;

Expand All @@ -60,8 +61,8 @@ public record BootstrapMethodRecord(int bci, int cpi, ResolvedJavaMethod method)
}

/*
* Map used to cache the BootstrapMethodInfo and reuse it for duplicated bytecode, avoiding to
* execute the bootstrap method for the same bci and method pair. This can happen during
* Map used to cache the BootstrapMethodInfo and reuse it for duplicated bytecode, avoiding
* execution of the bootstrap method for the same bci and method pair. This can happen during
* bytecode parsing as some blocks are duplicated, or for methods that are parsed multiple times
* (see MultiMethod).
*/
Expand Down Expand Up @@ -105,11 +106,15 @@ public BootstrapMethodConfiguration() {
Method enumSwitch = ReflectionUtil.lookupMethod(SwitchBootstraps.class, "enumSwitch", MethodHandles.Lookup.class, String.class, MethodType.class, Object[].class);

/* Bootstrap method used for retrieving the value of static final processors. */
Class<?> templateRuntime = ReflectionUtil.lookupClass(false, "java.lang.runtime.TemplateRuntime");
Method processStringTemplate = ReflectionUtil.lookupMethod(templateRuntime, "processStringTemplate", MethodHandles.Lookup.class, String.class, MethodType.class, MethodHandle.class,
String[].class);

indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch, processStringTemplate);
if (JavaVersionUtil.JAVA_SPEC < 23) {
Class<?> templateRuntime = ReflectionUtil.lookupClass(false, "java.lang.runtime.TemplateRuntime");
Method processStringTemplate = ReflectionUtil.lookupMethod(templateRuntime, "processStringTemplate", MethodHandles.Lookup.class, String.class, MethodType.class, MethodHandle.class,
String[].class);
indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch, processStringTemplate);
} else {
// JDK-8329948 removed the String Template feature
indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch);
}

/* Bootstrap methods used for various dynamic constants. */
Method nullConstant = ReflectionUtil.lookupMethod(ConstantBootstraps.class, "nullConstant", MethodHandles.Lookup.class, String.class, Class.class);
Expand All @@ -130,14 +135,19 @@ public BootstrapMethodConfiguration() {

@Override
public void beforeAnalysis(BeforeAnalysisAccess a) {
/*
* Those methods are used by ObjectMethods.bootstrap to combine the Strings of the records
* into one String
*/
Class<?> stringConcatHelper = ReflectionUtil.lookupClass(false, "java.lang.StringConcatHelper");
Class<?> formatConcatItem = ReflectionUtil.lookupClass(false, "jdk.internal.util.FormatConcatItem");
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "prepend", long.class, byte[].class, formatConcatItem, String.class));
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "mix", long.class, formatConcatItem));
if (JavaVersionUtil.JAVA_SPEC < 23) {
/*
* Those methods are used by ObjectMethods.bootstrap to combine the Strings of the
* records into one String
*/

Class<?> stringConcatHelper = ReflectionUtil.lookupClass(false, "java.lang.StringConcatHelper");
Class<?> formatConcatItem = ReflectionUtil.lookupClass(false, "jdk.internal.util.FormatConcatItem");
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "prepend", long.class, byte[].class, formatConcatItem, String.class));
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "mix", long.class, formatConcatItem));
} else {
// JDK-8329948 removed the String Template feature
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class ModuleNative {
private ModuleNative() {
}

/**
/*
* Re-implementations of native methods from {@code src/hotspot/share/classfile/modules.cpp}.
* See {@link Target_java_lang_Module} for more information on module system native
* substitutions.
Expand Down
Loading