use of com.oracle.svm.core.graal.code.SubstrateCompilationIdentifier in project graal by oracle.
the class SubstrateGraalUtils method doCompile.
/**
* Actual method compilation.
*
* For zone allocation this is where the zone boundary can be placed when the code is only
* compiled. However using the returned compilation result would result into a zone allocation
* invariant violation.
*/
private static CompilationResult doCompile(DebugContext initialDebug, RuntimeConfiguration runtimeConfig, Suites suites, LIRSuites lirSuites, final SubstrateMethod method) {
String methodString = method.format("%H.%n(%p)");
SubstrateCompilationIdentifier compilationId = new SubstrateCompilationIdentifier();
return new CompilationWrapper<CompilationResult>(GraalSupport.get().getDebugOutputDirectory(), compilationProblemsPerAction) {
@SuppressWarnings({ "unchecked", "unused" })
<E extends Throwable> RuntimeException silenceThrowable(Class<E> type, Throwable ex) throws E {
throw (E) ex;
}
@Override
protected CompilationResult handleException(Throwable t) {
throw silenceThrowable(RuntimeException.class, t);
}
@Override
protected CompilationResult performCompilation(DebugContext debug) {
StructuredGraph graph = GraalSupport.decodeGraph(debug, null, compilationId, method);
return compileGraph(runtimeConfig, suites, lirSuites, method, graph);
}
@Override
public String toString() {
return methodString;
}
@Override
protected DebugContext createRetryDebugContext(OptionValues options) {
return GraalSupport.get().openDebugContext(options, compilationId, method);
}
}.run(initialDebug);
}
Aggregations