Search in sources :

Example 6 with SubstrateCompilableTruffleAST

use of com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST in project graal by oracle.

the class IsolatedCompilableTruffleAST method isSameOrSplit0.

@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static boolean isSameOrSplit0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<SubstrateCompilableTruffleAST> compilableHandle, ClientHandle<SubstrateCompilableTruffleAST> otherHandle) {
    SubstrateCompilableTruffleAST compilable = IsolatedCompileClient.get().unhand(compilableHandle);
    SubstrateCompilableTruffleAST other = IsolatedCompileClient.get().unhand(otherHandle);
    return compilable.isSameOrSplit(other);
}
Also used : SubstrateCompilableTruffleAST(com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPointOptions(com.oracle.svm.core.c.function.CEntryPointOptions)

Example 7 with SubstrateCompilableTruffleAST

use of com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST in project graal by oracle.

the class IsolatedCompilableTruffleAST method dequeueInlined0.

@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static void dequeueInlined0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<SubstrateCompilableTruffleAST> handle) {
    final IsolatedCompileClient isolatedCompileClient = IsolatedCompileClient.get();
    final SubstrateCompilableTruffleAST compilable = isolatedCompileClient.unhand(handle);
    compilable.dequeueInlined();
}
Also used : IsolatedCompileClient(com.oracle.svm.graal.isolated.IsolatedCompileClient) SubstrateCompilableTruffleAST(com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPointOptions(com.oracle.svm.core.c.function.CEntryPointOptions)

Example 8 with SubstrateCompilableTruffleAST

use of com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST 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);
    }
}
Also used : SubstrateCompilableTruffleAST(com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST) TruffleCallNode(org.graalvm.compiler.truffle.common.TruffleCallNode) PinnedObject(org.graalvm.nativeimage.PinnedObject) ClientHandle(com.oracle.svm.graal.isolated.ClientHandle) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPointOptions(com.oracle.svm.core.c.function.CEntryPointOptions)

Example 9 with SubstrateCompilableTruffleAST

use of com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST in project graal by oracle.

the class IsolatedTruffleCallNode method getCurrentCallTarget0.

@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static ClientHandle<SubstrateCompilableTruffleAST> getCurrentCallTarget0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<TruffleCallNode> nodeHandle) {
    TruffleCallNode node = IsolatedCompileClient.get().unhand(nodeHandle);
    CompilableTruffleAST target = node.getCurrentCallTarget();
    return IsolatedCompileClient.get().hand((SubstrateCompilableTruffleAST) target);
}
Also used : TruffleCallNode(org.graalvm.compiler.truffle.common.TruffleCallNode) SubstrateCompilableTruffleAST(com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST) CompilableTruffleAST(org.graalvm.compiler.truffle.common.CompilableTruffleAST) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPointOptions(com.oracle.svm.core.c.function.CEntryPointOptions)

Aggregations

SubstrateCompilableTruffleAST (com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST)9 CEntryPointOptions (com.oracle.svm.core.c.function.CEntryPointOptions)8 CEntryPoint (org.graalvm.nativeimage.c.function.CEntryPoint)8 IsolatedCompileClient (com.oracle.svm.graal.isolated.IsolatedCompileClient)3 CompilableTruffleAST (org.graalvm.compiler.truffle.common.CompilableTruffleAST)3 Assumption (com.oracle.truffle.api.Assumption)2 JavaConstant (jdk.vm.ci.meta.JavaConstant)2 TruffleCallNode (org.graalvm.compiler.truffle.common.TruffleCallNode)2 ClientHandle (com.oracle.svm.graal.isolated.ClientHandle)1 CompilerIsolateThread (com.oracle.svm.graal.isolated.CompilerIsolateThread)1 IsolatedSpeculationLog (com.oracle.svm.graal.isolated.IsolatedSpeculationLog)1 SpeculationLog (jdk.vm.ci.meta.SpeculationLog)1 SuppressFBWarnings (org.graalvm.compiler.core.common.SuppressFBWarnings)1 PinnedObject (org.graalvm.nativeimage.PinnedObject)1