Search in sources :

Example 6 with HotSpotResolvedJavaMethod

use of jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod in project graal by oracle.

the class SPARCHotSpotNodeLIRBuilder method emitDirectCall.

@Override
protected void emitDirectCall(DirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
    InvokeKind invokeKind = ((HotSpotDirectCallTargetNode) callTarget).invokeKind();
    if (invokeKind.isIndirect()) {
        append(new SPARCHotspotDirectVirtualCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    } else {
        assert invokeKind.isDirect();
        HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) callTarget.targetMethod();
        assert resolvedMethod.isConcrete() : "Cannot make direct call to abstract method.";
        append(new SPARCHotspotDirectStaticCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    }
}
Also used : HotSpotDirectCallTargetNode(org.graalvm.compiler.hotspot.nodes.HotSpotDirectCallTargetNode) HotSpotResolvedJavaMethod(jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod) InvokeKind(org.graalvm.compiler.nodes.CallTargetNode.InvokeKind)

Example 7 with HotSpotResolvedJavaMethod

use of jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod in project graal by oracle.

the class AMD64HotSpotNodeLIRBuilder method emitDirectCall.

@Override
protected void emitDirectCall(DirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
    InvokeKind invokeKind = ((HotSpotDirectCallTargetNode) callTarget).invokeKind();
    if (invokeKind.isIndirect()) {
        append(new AMD64HotspotDirectVirtualCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    } else {
        assert invokeKind.isDirect();
        HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) callTarget.targetMethod();
        assert resolvedMethod.isConcrete() : "Cannot make direct call to abstract method.";
        append(new AMD64HotSpotDirectStaticCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    }
}
Also used : HotSpotDirectCallTargetNode(org.graalvm.compiler.hotspot.nodes.HotSpotDirectCallTargetNode) HotSpotResolvedJavaMethod(jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod) InvokeKind(org.graalvm.compiler.nodes.CallTargetNode.InvokeKind)

Example 8 with HotSpotResolvedJavaMethod

use of jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod in project graal by oracle.

the class AArch64HotSpotNodeLIRBuilder method emitDirectCall.

@Override
protected void emitDirectCall(DirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
    InvokeKind invokeKind = ((HotSpotDirectCallTargetNode) callTarget).invokeKind();
    if (invokeKind.isIndirect()) {
        append(new AArch64HotSpotDirectVirtualCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    } else {
        assert invokeKind.isDirect();
        HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) callTarget.targetMethod();
        assert resolvedMethod.isConcrete() : "Cannot make direct call to abstract method.";
        append(new AArch64HotSpotDirectStaticCallOp(callTarget.targetMethod(), result, parameters, temps, callState, invokeKind, getGen().config));
    }
}
Also used : HotSpotDirectCallTargetNode(org.graalvm.compiler.hotspot.nodes.HotSpotDirectCallTargetNode) HotSpotResolvedJavaMethod(jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod) InvokeKind(org.graalvm.compiler.nodes.CallTargetNode.InvokeKind)

Example 9 with HotSpotResolvedJavaMethod

use of jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod in project graal by oracle.

the class HotSpotTruffleCompilerImpl method getCompilationIdentifier.

@Override
public CompilationRequestIdentifier getCompilationIdentifier(CompilableTruffleAST compilable) {
    ResolvedJavaMethod rootMethod = partialEvaluator.rootForCallTarget(compilable);
    HotSpotCompilationRequest request = new HotSpotCompilationRequest((HotSpotResolvedJavaMethod) rootMethod, JVMCICompiler.INVOCATION_ENTRY_BCI, 0L);
    return new HotSpotTruffleCompilationIdentifier(request, compilable);
}
Also used : HotSpotCompilationRequest(jdk.vm.ci.hotspot.HotSpotCompilationRequest) HotSpotResolvedJavaMethod(jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod) ResolvedJavaMethod(jdk.vm.ci.meta.ResolvedJavaMethod)

Example 10 with HotSpotResolvedJavaMethod

use of jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod in project graal by oracle.

the class DefaultHotSpotLoweringProvider method lowerLoadMethodNode.

private void lowerLoadMethodNode(LoadMethodNode loadMethodNode) {
    StructuredGraph graph = loadMethodNode.graph();
    HotSpotResolvedJavaMethod method = (HotSpotResolvedJavaMethod) loadMethodNode.getMethod();
    ReadNode metaspaceMethod = createReadVirtualMethod(graph, loadMethodNode.getHub(), method, loadMethodNode.getReceiverType());
    graph.replaceFixed(loadMethodNode, metaspaceMethod);
}
Also used : HotSpotResolvedJavaMethod(jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod) StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) FloatingReadNode(org.graalvm.compiler.nodes.memory.FloatingReadNode) ReadNode(org.graalvm.compiler.nodes.memory.ReadNode)

Aggregations

HotSpotResolvedJavaMethod (jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod)16 HotSpotCompilationRequest (jdk.vm.ci.hotspot.HotSpotCompilationRequest)6 HotSpotResolvedObjectType (jdk.vm.ci.hotspot.HotSpotResolvedObjectType)4 CompilationTask (org.graalvm.compiler.hotspot.CompilationTask)4 HotSpotDirectCallTargetNode (org.graalvm.compiler.hotspot.nodes.HotSpotDirectCallTargetNode)4 HotSpotJVMCIRuntimeProvider (jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider)3 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)3 InvokeKind (org.graalvm.compiler.nodes.CallTargetNode.InvokeKind)3 OptionValues (org.graalvm.compiler.options.OptionValues)3 Reference (java.lang.ref.Reference)2 WeakReference (java.lang.ref.WeakReference)2 HotSpotResolvedJavaType (jdk.vm.ci.hotspot.HotSpotResolvedJavaType)2 ResolvedJavaType (jdk.vm.ci.meta.ResolvedJavaType)2 HotSpotGraalCompiler (org.graalvm.compiler.hotspot.HotSpotGraalCompiler)2 FloatingReadNode (org.graalvm.compiler.nodes.memory.FloatingReadNode)2 ReadNode (org.graalvm.compiler.nodes.memory.ReadNode)2 File (java.io.File)1 Method (java.lang.reflect.Method)1 URLClassLoader (java.net.URLClassLoader)1 ByteBuffer (java.nio.ByteBuffer)1