< prev index next >
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java
Print this page
@@ -361,15 +361,15 @@
* @param compilerLeafClasses classes in the leaves of the module graph comprising the JVMCI
* compiler.
*/
public Predicate<ResolvedJavaType> getIntrinsificationTrustPredicate(Class<?>... compilerLeafClasses) {
if (intrinsificationTrustPredicate == null) {
- intrinsificationTrustPredicate = new Predicate<ResolvedJavaType>() {
+ intrinsificationTrustPredicate = new Predicate<>() {
@Override
public boolean test(ResolvedJavaType type) {
if (type instanceof HotSpotResolvedJavaType) {
- Class<?> mirror = getMirror((HotSpotResolvedJavaType) type);
+ Class<?> mirror = getMirror(type);
Module module = mirror.getModule();
return getTrustedModules().contains(module);
} else {
return false;
}
@@ -411,10 +411,11 @@
* @param type the type for which a {@link Class} is requested
* @return the original Java class corresponding to {@code type} or {@code null} if this runtime
* does not support mapping {@link ResolvedJavaType} instances to {@link Class}
* instances
*/
+ @SuppressWarnings("static-method")
public Class<?> getMirror(ResolvedJavaType type) {
return ((HotSpotResolvedJavaType) type).mirror();
}
@Override
@@ -652,10 +653,11 @@
/**
* The offset from the origin of an array to the first element.
*
* @return the offset in bytes
*/
+ @SuppressWarnings("static-method")
public int getArrayBaseOffset(JavaKind kind) {
switch (kind) {
case Boolean:
return Unsafe.ARRAY_BOOLEAN_BASE_OFFSET;
case Byte:
@@ -683,10 +685,11 @@
/**
* The scale used for the index when accessing elements of an array of this kind.
*
* @return the scale in order to convert the index into a byte offset
*/
+ @SuppressWarnings("static-method")
public int getArrayIndexScale(JavaKind kind) {
switch (kind) {
case Boolean:
return Unsafe.ARRAY_BOOLEAN_INDEX_SCALE;
case Byte:
@@ -757,9 +760,10 @@
* is {@link Class#isPrimitive()}
* @throws UnsatisfiedLinkError if the JVMCI SVM library is not available, a native method in
* {@code clazz} is already linked or the SVM JVMCI library does not contain a
* JNI-compliant symbol for a native method in {@code clazz}
*/
+ @SuppressWarnings({"static-method", "unused"})
public void registerNativeMethods(Class<?> clazz) {
throw new UnsatisfiedLinkError("SVM library is not available");
}
}
< prev index next >