diff --git a/common.json b/common.json index fb15d60c411e..d4504ffb2559 100644 --- a/common.json +++ b/common.json @@ -42,13 +42,13 @@ "labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b15-debug", "platformspecific": true }, "labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b15-sulong", "platformspecific": true }, - "oraclejdk-latest": {"name": "jpg-jdk", "version": "22", "build_id": "17", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, - "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+17-jvmci-b01", "platformspecific": true }, - "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+17-jvmci-b01-debug", "platformspecific": true }, - "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+17-jvmci-b01-sulong", "platformspecific": true }, - "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22+17-jvmci-b01", "platformspecific": true }, - "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22+17-jvmci-b01-debug", "platformspecific": true }, - "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22+17-jvmci-b01-sulong", "platformspecific": true } + "oraclejdk-latest": {"name": "jpg-jdk", "version": "22", "build_id": "18", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, + "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+18-jvmci-b01", "platformspecific": true }, + "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+18-jvmci-b01-debug", "platformspecific": true }, + "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+18-jvmci-b01-sulong", "platformspecific": true }, + "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22+18-jvmci-b01", "platformspecific": true }, + "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22+18-jvmci-b01-debug", "platformspecific": true }, + "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22+18-jvmci-b01-sulong", "platformspecific": true } }, "eclipse": { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java index dcc3b77fb125..e324eb17e00b 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java @@ -120,7 +120,7 @@ private HotSpotGraalRuntime.HotSpotGC getSelectedGC() throws GraalError { public final int hugeMethodLimit = getFlag("HugeMethodLimit", Integer.class); public final boolean printInlining = getFlag("PrintInlining", Boolean.class); public final boolean inline = getFlag("Inline", Boolean.class); - public final boolean useFastLocking = getFlag("JVMCIUseFastLocking", Boolean.class); + public final boolean useFastLocking = getFlag("JVMCIUseFastLocking", Boolean.class, true, !(JDK >= 22 && JDK_BUILD >= 18)); private final boolean useHeavyMonitors = JDK < 22 && getFlag("UseHeavyMonitors", Boolean.class); // Use only heavy monitors for locking diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java index dbdac5c2639e..9cc047467baa 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java @@ -115,7 +115,7 @@ public static boolean jvmciGE(Version v) { } public static final int JDK = Runtime.version().feature(); - public static final int JDK_UPDATE = Runtime.version().update(); + public static final int JDK_BUILD = Runtime.version().build().orElse(0); public static final Version JVMCI_VERSION; public static final boolean JVMCI; public static final boolean JDK_PRERELEASE; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java index 30da62e4dbea..93ec678914b8 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java @@ -48,7 +48,7 @@ public final class JVMCIVersionCheck { */ private static final Map JVMCI_MIN_VERSIONS = Map.of( "21", new Version(23, 1, 15), - "22", new Version("22+17", 1)); + "22", new Version("22+18", 1)); private static final int NA = 0; /** diff --git a/sdk/ci/ci.jsonnet b/sdk/ci/ci.jsonnet index 0e2aa0a43f7e..f48c6180ed21 100644 --- a/sdk/ci/ci.jsonnet +++ b/sdk/ci/ci.jsonnet @@ -6,7 +6,7 @@ downloads+: { EXTRA_JAVA_HOMES: common.jdks_data['oraclejdk21'], }, - name: 'gate-sdk-oraclejdk' + self.jdk_version + '-' + self.os + '-' + self.arch, + name: 'gate-sdk-oracle' + self.jdk_name + '-' + self.os + '-' + self.arch, setup: [ ["cd", "./sdk"], ], diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 53efb8162b1b..56351fa00ec7 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1681,7 +1681,7 @@ def collector(line): else: # Linux objdump objdump --wide --syms # 0000000000000000 *UND* 0000000000000000 JVM_InitStackTraceElement - found_undef = line_tokens[1] = '*UND*' + found_undef = line_tokens[1] == '*UND*' if found_undef: symbol_candiate = line_tokens[-1] mx.logvv('Found undefined symbol: ' + symbol_candiate) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/JavaLangSubstitutions.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/JavaLangSubstitutions.java index 347e6591fd8f..9ff2c31c601c 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/JavaLangSubstitutions.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/JavaLangSubstitutions.java @@ -32,7 +32,6 @@ import java.io.InputStream; import java.io.PrintStream; import java.net.URL; -import java.util.ArrayList; import java.util.Arrays; import java.util.Enumeration; import java.util.List; @@ -41,7 +40,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.function.BooleanSupplier; -import java.util.regex.Pattern; import java.util.stream.Stream; import org.graalvm.compiler.replacements.nodes.BinaryMathIntrinsicNode; @@ -186,73 +184,6 @@ public String intern() { @Alias // int hash; - /** - * This is a copy of String.split from the JDK, but with the fastpath loop factored out into a - * separate method. This allows inlining and constant folding of the condition for call sites - * where the regex is a constant (which is a common usage pattern). - * - * JDK-8262994 should make that refactoring in OpenJDK, after which this substitution can be - * removed. - */ - @Substitute - public String[] split(String regex, int limit) { - /* - * fastpath if the regex is a (1) one-char String and this character is not one of the - * RegEx's meta characters ".$|()[{^?*+\\", or (2) two-char String and the first char is the - * backslash and the second is not the ascii digit or ascii letter. - */ - char ch = 0; - if (((regex.length() == 1 && - ".$|()[{^?*+\\".indexOf(ch = regex.charAt(0)) == -1) || - (regex.length() == 2 && - regex.charAt(0) == '\\' && - (((ch = regex.charAt(1)) - '0') | ('9' - ch)) < 0 && - ((ch - 'a') | ('z' - ch)) < 0 && - ((ch - 'A') | ('Z' - ch)) < 0)) && - (ch < Character.MIN_HIGH_SURROGATE || - ch > Character.MAX_LOW_SURROGATE)) { - return StringHelper.simpleSplit(SubstrateUtil.cast(this, String.class), limit, ch); - } - return Pattern.compile(regex).split(SubstrateUtil.cast(this, String.class), limit); - } -} - -final class StringHelper { - static String[] simpleSplit(String that, int limit, char ch) { - int off = 0; - int next = 0; - boolean limited = limit > 0; - ArrayList list = new ArrayList<>(); - while ((next = that.indexOf(ch, off)) != -1) { - if (!limited || list.size() < limit - 1) { - list.add(that.substring(off, next)); - off = next + 1; - } else { // last one - // assert (list.size() == limit - 1); - int last = that.length(); - list.add(that.substring(off, last)); - off = last; - break; - } - } - // If no match was found, return this - if (off == 0) { - return new String[]{that}; - } - // Add remaining segment - if (!limited || list.size() < limit) { - list.add(that.substring(off, that.length())); - } - // Construct result - int resultSize = list.size(); - if (limit == 0) { - while (resultSize > 0 && list.get(resultSize - 1).isEmpty()) { - resultSize--; - } - } - String[] result = new String[resultSize]; - return list.subList(0, resultSize).toArray(result); - } } @TargetClass(className = "java.lang.StringLatin1") diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 69d008f16b74..4873a09ac546 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -837,6 +837,8 @@ "javaCompliance" : "21+", "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"], "workingSets" : "Truffle", + # disable SpotBugs as long is panama is preview [GR-49448] + "spotbugs" : "false", }, "com.oracle.truffle.nfi.backend.spi" : { diff --git a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/ErrorContext.java b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/ErrorContext.java index a42533a02359..51b165c06eac 100644 --- a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/ErrorContext.java +++ b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/ErrorContext.java @@ -88,7 +88,7 @@ public void setNativeErrno(int nativeErrno) { this.nativeErrno = nativeErrno; } - @SuppressWarnings("preview") + @SuppressWarnings({"preview", "restricted"}) MemorySegment getErrnoLocation() { Linker linker = Linker.nativeLinker(); FunctionDescriptor desc = FunctionDescriptor.of(ValueLayout.JAVA_LONG); diff --git a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaNFIBackend.java b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaNFIBackend.java index dd078c40a995..addce143a8af 100644 --- a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaNFIBackend.java +++ b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaNFIBackend.java @@ -110,7 +110,7 @@ protected LoadLibraryNode(PanamaNFILanguage language, String name) { } @TruffleBoundary - @SuppressWarnings("preview") + @SuppressWarnings({"preview", "restricted"}) private SymbolLookup doLoad() { PanamaNFIContext ctx = PanamaNFIContext.get(this); try { diff --git a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaSignature.java b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaSignature.java index e578dc6fea8f..0ce8f534f7fb 100644 --- a/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaSignature.java +++ b/truffle/src/com.oracle.truffle.nfi.backend.panama/src/com/oracle/truffle/nfi/backend/panama/PanamaSignature.java @@ -147,7 +147,7 @@ MethodType getUpcallMethodType() { } @TruffleBoundary - @SuppressWarnings("preview") + @SuppressWarnings({"preview", "restricted"}) MemorySegment bind(MethodHandle cachedHandle, Object receiver) { MethodHandle bound = cachedHandle.bindTo(receiver); @SuppressWarnings("preview") @@ -310,7 +310,7 @@ public static CachedSignatureInfo prepareSignatureInfo(PanamaType retType, ArgsS static MethodHandle createDowncallHandle(@SuppressWarnings("preview") FunctionDescriptor descriptor) { int parameterCount = descriptor.argumentLayouts().size(); - @SuppressWarnings("preview") + @SuppressWarnings({"preview", "restricted"}) MethodHandle handle = Linker.nativeLinker().downcallHandle(descriptor).asSpreader(Object[].class, parameterCount).asType( MethodType.methodType(Object.class, new Class[]{MemorySegment.class, Object[].class})); return handle; diff --git a/vm/mx.vm/suite.py b/vm/mx.vm/suite.py index 3a059cc69812..d611a12b1775 100644 --- a/vm/mx.vm/suite.py +++ b/vm/mx.vm/suite.py @@ -33,7 +33,7 @@ "name": "graal-nodejs", "subdir": True, "dynamic": True, - "version": "6dd82d9f89f1be47d34b82f16d99afffd2a309af", + "version": "e0f922185f627f2bf8e3d9117996a698c7f8980b", "urls" : [ {"url" : "https://github.com/graalvm/graaljs.git", "kind" : "git"}, ] @@ -42,7 +42,7 @@ "name": "graal-js", "subdir": True, "dynamic": True, - "version": "6dd82d9f89f1be47d34b82f16d99afffd2a309af", + "version": "e0f922185f627f2bf8e3d9117996a698c7f8980b", "urls": [ {"url": "https://github.com/graalvm/graaljs.git", "kind" : "git"}, ]