use of jdk.vm.ci.hotspot.HotSpotVMConfigAccess in project graal by oracle.
the class HotSpotTruffleRuntimeAccess method getRuntime.
@Override
public TruffleRuntime getRuntime() {
// initialize JVMCI to make sure the TruffleCompiler option is parsed
Services.initializeJVMCI();
HotSpotJVMCIRuntimeProvider hsRuntime = (HotSpotJVMCIRuntimeProvider) JVMCI.getRuntime();
HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(hsRuntime.getConfigStore());
boolean useCompiler = config.getFlag("UseCompiler", Boolean.class);
if (!useCompiler) {
// This happens, for example, when -Xint is given on the command line
return new DefaultTruffleRuntime();
}
return new HotSpotTruffleRuntime(new LazyGraalRuntime());
}
Aggregations