use of org.graalvm.compiler.truffle.common.TruffleDebugJavaMethod in project graal by oracle.
the class GraalTruffleRuntime method doCompile.
@SuppressWarnings("try")
protected void doCompile(OptionValues options, OptimizedCallTarget callTarget, Cancellable task) {
listeners.onCompilationStarted(callTarget);
TruffleCompiler compiler = getTruffleCompiler();
TruffleInlining inlining = new TruffleInlining(callTarget, new DefaultInliningPolicy());
CompilationIdentifier compilationId = compiler.getCompilationIdentifier(callTarget);
try (DebugContext debug = compilationId != null ? compiler.openDebugContext(options, compilationId, callTarget) : null) {
try (Scope s = debug != null ? debug.scope("Truffle", new TruffleDebugJavaMethod(callTarget)) : null) {
maybeDumpTruffleTree(debug, options, callTarget, inlining);
compiler.doCompile(debug, compilationId, options, callTarget, inlining, task, listeners.isEmpty() ? null : listeners);
} catch (RuntimeException | Error e) {
throw e;
} catch (Throwable e) {
throw new InternalError(e);
}
}
dequeueInlinedCallSites(inlining, callTarget);
}
Aggregations