src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java Mon Mar 20 17:38:38 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java Mon Mar 20 17:38:37 2017
*** 21,30 ****
--- 21,31 ----
* questions.
*/
package org.graalvm.compiler.hotspot;
import java.util.Formatter;
+ import java.util.Objects;
/**
* Mechanism for checking that the current Java runtime environment supports the minimum JVMCI API
* required by Graal. The {@code JVMCI_VERSION_CHECK} environment variable can be used to ignore a
* failed check ({@code JVMCI_VERSION_CHECK=ignore}) or print a warning (
*** 35,48 ****
--- 36,50 ----
* This class only depends on the JDK so that it can be used without building Graal.
*/
class JVMCIVersionCheck {
private static final int JVMCI8_MIN_MAJOR_VERSION = 0;
! private static final int JVMCI8_MIN_MINOR_VERSION = 23;
! private static final int JVMCI8_MIN_MINOR_VERSION = 24;
! // Will be updated once an ea build with the required JVMCI API is available.
private static final int JVMCI9_MIN_EA_BUILD = 143;
! // MAX_VALUE indicates that no current EA version is compatible with Graal.
+ // Note: Keep README.md in sync with the EA version support checked here.
+ private static final int JVMCI9_MIN_EA_BUILD = 161;
private static void failVersionCheck(boolean exit, String reason, Object... args) {
Formatter errorMessage = new Formatter().format(reason, args);
String javaHome = System.getProperty("java.home");
String vmName = System.getProperty("java.vm.name");
*** 114,124 ****
--- 116,130 ----
}
int build = Integer.parseInt(vmVersion.substring(start, end));
if (build >= JVMCI9_MIN_EA_BUILD) {
return;
}
+ if (Objects.equals(JVMCI9_MIN_EA_BUILD, Integer.MAX_VALUE)) {
+ failVersionCheck(exitOnFailure, "This version of Graal is not compatible with any JDK 9 Early Access build.%n");
+ } else {
failVersionCheck(exitOnFailure, "The VM is an insufficiently recent EA JDK9 build for Graal: %d < %d.%n", build, JVMCI9_MIN_EA_BUILD);
+ }
return;
}
failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
"Cannot read JDK9 EA build number from java.vm.version property: %s.%n", vmVersion);
}
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File