use of org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal in project graal by oracle.
the class HSTruffleCompilerListener method onTruffleTierFinished.
@TruffleFromLibGraal(OnTruffleTierFinished)
@Override
public void onTruffleTierFinished(CompilableTruffleAST compilable, TruffleInliningData inliningPlan, GraphInfo graph) {
JObject hsCompilable = ((HSCompilableTruffleAST) compilable).getHandle();
JObject hsInliningPlan = ((HSTruffleInliningData) inliningPlan).getHandle();
JNIEnv env = JNIMethodScope.env();
try (LibGraalObjectHandleScope graphInfoScope = LibGraalObjectHandleScope.forObject(graph)) {
callOnTruffleTierFinished(env, getHandle(), hsCompilable, hsInliningPlan, graphInfoScope.getHandle());
}
}
use of org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal in project graal by oracle.
the class HSTruffleCompilerListener method onFailure.
@TruffleFromLibGraal(OnFailure)
@Override
public void onFailure(CompilableTruffleAST compilable, String serializedException, boolean bailout, boolean permanentBailout, int tier) {
JObject hsCompilable = ((HSCompilableTruffleAST) compilable).getHandle();
JNIEnv env = JNIMethodScope.env();
JString hsReason = createHSString(env, serializedException);
callOnFailure(env, getHandle(), hsCompilable, hsReason, bailout, permanentBailout, tier);
}
use of org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal in project graal by oracle.
the class HSTruffleInliningData method findCallNode.
@TruffleFromLibGraal(FindCallNode)
@Override
public TruffleCallNode findCallNode(JavaConstant callNode) {
long nodeHandle = LibGraal.translate(callNode);
JNIEnv env = scope.getEnv();
JObject res = callFindCallNode(env, getHandle(), nodeHandle);
if (res.isNull()) {
return null;
}
return new HSTruffleCallNode(scope, res);
}
use of org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal in project graal by oracle.
the class HSTruffleInliningData method addTargetToDequeue.
@TruffleFromLibGraal(AddTargetToDequeue)
@Override
public void addTargetToDequeue(CompilableTruffleAST target) {
JObject hsCompilable = ((HSCompilableTruffleAST) target).getHandle();
JNIEnv env = scope.getEnv();
callAddTargetToDequeue(env, getHandle(), hsCompilable);
}
Aggregations