src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File
open Cdiff src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java
Print this page
*** 44,56 ****
* to perform a compilation. This allows the reflective parts of the JVMCI API to be used
* without requiring a compiler implementation to be available.
*/
private static class DummyCompilerFactory implements JVMCICompilerFactory, JVMCICompiler {
@Override
public HotSpotCompilationRequestResult compileMethod(CompilationRequest request) {
! throw new JVMCIError("no JVMCI compiler selected");
}
@Override
public String getCompilerName() {
return "null";
--- 44,62 ----
* to perform a compilation. This allows the reflective parts of the JVMCI API to be used
* without requiring a compiler implementation to be available.
*/
private static class DummyCompilerFactory implements JVMCICompilerFactory, JVMCICompiler {
+ private final String reason;
+
+ DummyCompilerFactory(String reason) {
+ this.reason = reason;
+ }
+
@Override
public HotSpotCompilationRequestResult compileMethod(CompilationRequest request) {
! throw new JVMCIError("no JVMCI compiler selected: " + reason);
}
@Override
public String getCompilerName() {
return "null";
*** 77,88 ****
static JVMCICompilerFactory getCompilerFactory() {
if (compilerFactory == null) {
JVMCICompilerFactory factory = null;
String compilerName = Option.Compiler.getString();
if (compilerName != null) {
! if (compilerName.isEmpty() || compilerName.equals("null")) {
! factory = new DummyCompilerFactory();
} else {
for (JVMCICompilerFactory f : getJVMCICompilerFactories()) {
if (f.getCompilerName().equals(compilerName)) {
factory = f;
}
--- 83,96 ----
static JVMCICompilerFactory getCompilerFactory() {
if (compilerFactory == null) {
JVMCICompilerFactory factory = null;
String compilerName = Option.Compiler.getString();
if (compilerName != null) {
! if (compilerName.isEmpty()) {
! factory = new DummyCompilerFactory(" empty \"\" is specified");
! } else if (compilerName.equals("null")) {
! factory = new DummyCompilerFactory("\"null\" is specified");
} else {
for (JVMCICompilerFactory f : getJVMCICompilerFactories()) {
if (f.getCompilerName().equals(compilerName)) {
factory = f;
}
*** 91,112 ****
throw new JVMCIError("JVMCI compiler '%s' not found", compilerName);
}
}
} else {
// Auto select a single available compiler
for (JVMCICompilerFactory f : getJVMCICompilerFactories()) {
if (factory == null) {
openJVMCITo(f.getClass().getModule());
factory = f;
} else {
// Multiple factories seen - cancel auto selection
factory = null;
break;
}
}
if (factory == null) {
! factory = new DummyCompilerFactory();
}
}
factory.onSelection();
compilerFactory = factory;
}
--- 99,122 ----
throw new JVMCIError("JVMCI compiler '%s' not found", compilerName);
}
}
} else {
// Auto select a single available compiler
+ String reason = "default compiler is not found";
for (JVMCICompilerFactory f : getJVMCICompilerFactories()) {
if (factory == null) {
openJVMCITo(f.getClass().getModule());
factory = f;
} else {
// Multiple factories seen - cancel auto selection
+ reason = "multiple factories seen: \"" + factory.getCompilerName() + "\" and \"" + f.getCompilerName() + "\"";
factory = null;
break;
}
}
if (factory == null) {
! factory = new DummyCompilerFactory(reason);
}
}
factory.onSelection();
compilerFactory = factory;
}
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File