Skip to content

Commit e629186

Browse files
[GR-36838] Update to jvmci-22.1-b02.
PullRequest: graal/11181
2 parents d56d975 + 7ba248a commit e629186

File tree

4 files changed

+113
-10
lines changed

4 files changed

+113
-10
lines changed

common.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
"jdks": {
55
"openjdk11": {"name": "openjdk", "version": "11.0.11+9", "platformspecific": true },
66
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.11+9", "platformspecific": true },
7-
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.15+2-jvmci-22.1-b01", "platformspecific": true },
8-
"labsjdk-ce-11-llvm": {"name": "labsjdk", "version": "ce-11.0.15+2-jvmci-22.1-b01-sulong", "platformspecific": true },
9-
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.14+6-jvmci-22.1-b01", "platformspecific": true },
10-
"labsjdk-ee-11-llvm": {"name": "labsjdk", "version": "ee-11.0.14+6-jvmci-22.1-b01-sulong", "platformspecific": true },
7+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.15+4-jvmci-22.1-b02", "platformspecific": true },
8+
"labsjdk-ce-11-llvm": {"name": "labsjdk", "version": "ce-11.0.15+4-jvmci-22.1-b02-sulong", "platformspecific": true },
9+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.15+7-jvmci-22.1-b02", "platformspecific": true },
10+
"labsjdk-ee-11-llvm": {"name": "labsjdk", "version": "ee-11.0.15+7-jvmci-22.1-b02-sulong", "platformspecific": true },
1111

1212
"oraclejdk17": {"name": "oraclejdk", "version": "17.0.1+12", "platformspecific": true },
13-
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.3+2-jvmci-22.1-b01", "platformspecific": true },
14-
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.3+2-jvmci-22.1-b01-debug", "platformspecific": true },
15-
"labsjdk-ce-17-llvm": {"name": "labsjdk", "version": "ce-17.0.3+2-jvmci-22.1-b01-sulong", "platformspecific": true },
16-
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.3+6-jvmci-22.1-b01", "platformspecific": true },
17-
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.3+6-jvmci-22.1-b01-debug", "platformspecific": true },
18-
"labsjdk-ee-17-llvm": {"name": "labsjdk", "version": "ee-17.0.3+6-jvmci-22.1-b01-sulong", "platformspecific": true }
13+
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.3+4-jvmci-22.1-b02", "platformspecific": true },
14+
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.3+4-jvmci-22.1-b02-debug", "platformspecific": true },
15+
"labsjdk-ce-17-llvm": {"name": "labsjdk", "version": "ce-17.0.3+4-jvmci-22.1-b02-sulong", "platformspecific": true },
16+
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.3+7-jvmci-22.1-b02", "platformspecific": true },
17+
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.3+7-jvmci-22.1-b02-debug", "platformspecific": true },
18+
"labsjdk-ee-17-llvm": {"name": "labsjdk", "version": "ee-17.0.3+7-jvmci-22.1-b02-sulong", "platformspecific": true }
1919
},
2020

2121
"COMMENT.devkits" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
package com.oracle.svm.core.jdk;
26+
27+
import java.util.Arrays;
28+
import java.util.function.BooleanSupplier;
29+
import java.util.Optional;
30+
import java.util.stream.Stream;
31+
32+
/**
33+
* A predicate that returns {@code true} iff
34+
* {@code boolean java.lang.ClassLoader.NativeLibrary.load0(String name, boolean isBuiltin)} exists.
35+
* It should only be used in conjunction with {@link JDK11OrEarlier} as {@code NativeLibrary} was
36+
* moved to a top level class in later JDKs.
37+
*/
38+
// Checkstyle: allow Class.getSimpleName
39+
public class Load0With2Args implements BooleanSupplier {
40+
@Override
41+
public boolean getAsBoolean() {
42+
Optional<Class<?>> nativeLibrary = Stream.of(ClassLoader.class.getDeclaredClasses()).filter(c -> c.getSimpleName().equals("NativeLibrary")).findFirst();
43+
if (nativeLibrary.isPresent()) {
44+
Class<?>[] signature = {String.class, boolean.class};
45+
return Stream.of(nativeLibrary.get().getDeclaredMethods()).filter(m -> m.getName().equals("load0") && Arrays.equals(m.getParameters(), signature)).findFirst().isPresent();
46+
}
47+
return false;
48+
}
49+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
package com.oracle.svm.core.jdk;
26+
27+
import java.util.Arrays;
28+
import java.util.function.BooleanSupplier;
29+
import java.util.Optional;
30+
import java.util.stream.Stream;
31+
32+
/**
33+
* A predicate that returns {@code true} iff
34+
* {@code boolean java.lang.ClassLoader.NativeLibrary.load0(String name, boolean isBuiltin, boolean throwExceptionIfFail)}
35+
* exists. It should only be used in conjunction with {@link JDK11OrEarlier} as
36+
* {@code NativeLibrary} was moved to a top level class in later JDKs.
37+
*/
38+
// Checkstyle: allow Class.getSimpleName
39+
public class Load0With3Args implements BooleanSupplier {
40+
@Override
41+
public boolean getAsBoolean() {
42+
Optional<Class<?>> nativeLibrary = Stream.of(ClassLoader.class.getDeclaredClasses()).filter(c -> c.getSimpleName().equals("NativeLibrary")).findFirst();
43+
if (nativeLibrary.isPresent()) {
44+
Class<?>[] signature = {String.class, boolean.class, boolean.class};
45+
return Stream.of(nativeLibrary.get().getDeclaredMethods()).filter(m -> m.getName().equals("load0") && Arrays.equals(m.getParameters(), signature)).findFirst().isPresent();
46+
}
47+
return false;
48+
}
49+
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_lang_ClassLoader.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,13 @@ final class Target_java_lang_ClassLoader_NativeLibrary {
398398
*/
399399

400400
@Delete
401+
@TargetElement(onlyWith = Load0With2Args.class)
401402
private native boolean load0(String name, boolean isBuiltin);
402403

404+
@Delete
405+
@TargetElement(onlyWith = Load0With3Args.class)
406+
private native boolean load0(String name, boolean isBuiltin, boolean throwExceptionIfFail);
407+
403408
@Delete
404409
private native long findEntry(String name);
405410

0 commit comments

Comments
 (0)