use of com.oracle.svm.graal.isolated.ClientHandle in project graal by oracle.
the class IsolatedTruffleRuntimeSupport method isSuppressedFailure0.
@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static boolean isSuppressedFailure0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<SubstrateCompilableTruffleAST> ast, CompilerHandle<Supplier<String>> serializedExceptionHandle) {
Supplier<String> serializedException = () -> {
ClientHandle<String> resultHandle = getReasonAndStackTrace0(IsolatedCompileClient.get().getCompiler(), serializedExceptionHandle);
return IsolatedCompileClient.get().unhand(resultHandle);
};
SubstrateTruffleRuntime runtime = (SubstrateTruffleRuntime) SubstrateTruffleRuntime.getRuntime();
return runtime.isSuppressedFailure(IsolatedCompileClient.get().unhand(ast), serializedException);
}
use of com.oracle.svm.graal.isolated.ClientHandle in project graal by oracle.
the class IsolatedCompilableTruffleAST method getCallNodes0.
@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static CompilerHandle<IsolatedTruffleCallNode[]> getCallNodes0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<SubstrateCompilableTruffleAST> compilableHandle) {
SubstrateCompilableTruffleAST compilable = IsolatedCompileClient.get().unhand(compilableHandle);
TruffleCallNode[] nodes = compilable.getCallNodes();
ClientHandle<?>[] nodeHandles = new ClientHandle<?>[nodes.length];
for (int i = 0; i < nodes.length; i++) {
nodeHandles[i] = IsolatedCompileClient.get().hand(nodes[i]);
}
try (PinnedObject pinnedNodeHandles = PinnedObject.create(nodeHandles)) {
return getCallNodes1(IsolatedCompileClient.get().getCompiler(), pinnedNodeHandles.addressOfArrayElement(0), nodeHandles.length);
}
}
Aggregations