Search in sources :

Example 1 with TruffleSourceLanguagePosition

use of org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition in project graal by oracle.

the class IsolatedTruffleInlining method getPosition0.

@CEntryPoint(include = CEntryPoint.NotIncludedAutomatically.class)
@CEntryPointOptions(publishAs = CEntryPointOptions.Publish.NotPublished)
private static CompilerHandle<TruffleSourceLanguagePosition> getPosition0(@SuppressWarnings("unused") ClientIsolateThread client, ClientHandle<? extends TruffleInliningData> inliningHandle, ClientHandle<?> callNodeConstantHandle) {
    TruffleInliningData inlining = IsolatedCompileClient.get().unhand(inliningHandle);
    JavaConstant callNodeConstant = SubstrateObjectConstant.forObject(IsolatedCompileClient.get().unhand(callNodeConstantHandle));
    TruffleSourceLanguagePosition position = inlining.getPosition(callNodeConstant);
    if (position == null) {
        return IsolatedHandles.nullHandle();
    }
    return createPositionInCompiler(IsolatedCompileClient.get().getCompiler(), IsolatedCompileClient.get().hand(position), position.getLineNumber(), position.getOffsetStart(), position.getOffsetEnd(), position.getNodeId());
}
Also used : TruffleInliningData(org.graalvm.compiler.truffle.common.TruffleInliningData) JavaConstant(jdk.vm.ci.meta.JavaConstant) TruffleSourceLanguagePosition(org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) CEntryPointOptions(com.oracle.svm.core.c.function.CEntryPointOptions)

Aggregations

CEntryPointOptions (com.oracle.svm.core.c.function.CEntryPointOptions)1 JavaConstant (jdk.vm.ci.meta.JavaConstant)1 TruffleInliningData (org.graalvm.compiler.truffle.common.TruffleInliningData)1 TruffleSourceLanguagePosition (org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition)1 CEntryPoint (org.graalvm.nativeimage.c.function.CEntryPoint)1