use of com.oracle.svm.hosted.nodes.SubstrateMethodCallTargetNode in project graal by oracle.
the class DevirtualizeCallsPhase method run.
@Override
protected void run(StructuredGraph graph) {
for (Invoke invoke : graph.getInvokes()) {
if (invoke.callTarget() instanceof SubstrateMethodCallTargetNode) {
SubstrateMethodCallTargetNode callTarget = (SubstrateMethodCallTargetNode) invoke.callTarget();
JavaMethodProfile methodProfile = callTarget.getMethodProfile();
if (methodProfile != null) {
if (methodProfile.getMethods().length == 0) {
unreachableInvoke(graph, invoke, callTarget);
} else if (methodProfile.getMethods().length == 1) {
if (callTarget.invokeKind().isIndirect()) {
singleCallee((HostedMethod) methodProfile.getMethods()[0].getMethod(), graph, invoke, callTarget);
}
}
}
}
}
}
Aggregations