use of org.graalvm.compiler.api.runtime.GraalJVMCICompiler in project graal by oracle.
the class Graal method initializeRuntime.
private static GraalRuntime initializeRuntime() {
Services.initializeJVMCI();
JVMCICompiler compiler = JVMCI.getRuntime().getCompiler();
if (compiler instanceof GraalJVMCICompiler) {
GraalJVMCICompiler graal = (GraalJVMCICompiler) compiler;
return graal.getGraalRuntime();
} else {
return new InvalidGraalRuntime();
}
}
use of org.graalvm.compiler.api.runtime.GraalJVMCICompiler in project graal by oracle.
the class LambdaStableNameTest method findStableLambdaName.
private String findStableLambdaName(ResolvedJavaType type) {
OptionValues options = new OptionValues(OptionValues.newOptionMap());
DebugContext debug = new Builder(options, Collections.emptyList()).build();
GraalJVMCICompiler compiler = (GraalJVMCICompiler) JVMCI.getRuntime().getCompiler();
Providers providers = compiler.getGraalRuntime().getCapability(RuntimeProvider.class).getHostBackend().getProviders();
final HotSpotJITClassInitializationPlugin initializationPlugin = new HotSpotJITClassInitializationPlugin();
return LambdaUtils.findStableLambdaName(initializationPlugin, providers, type, options, debug, this);
}
use of org.graalvm.compiler.api.runtime.GraalJVMCICompiler in project graal by oracle.
the class HotSpotTruffleCompilerImpl method getCompiler.
private static GraalJVMCICompiler getCompiler(OptionValues options) {
HotSpotJVMCIRuntime runtime = HotSpotJVMCIRuntime.runtime();
if (!Options.TruffleCompilerConfiguration.hasBeenSet(options)) {
JVMCICompiler compiler = runtime.getCompiler();
if (compiler instanceof GraalJVMCICompiler) {
return (GraalJVMCICompiler) compiler;
}
}
CompilerConfigurationFactory compilerConfigurationFactory = CompilerConfigurationFactory.selectFactory(Options.TruffleCompilerConfiguration.getValue(options), options, runtime);
return HotSpotGraalCompilerFactory.createCompiler("Truffle", runtime, options, compilerConfigurationFactory);
}
Aggregations