Search in sources :

Example 1 with UnsafePartitionLoadNode

use of com.oracle.graal.pointsto.nodes.UnsafePartitionLoadNode in project graal by oracle.

the class SubstrateGraphBuilderPlugins method registerEdgesPlugins.

private static void registerEdgesPlugins(MetaAccessProvider metaAccess, InvocationPlugins plugins) {
    Registration r = new Registration(plugins, Edges.class).setAllowOverwrite(true);
    for (Class<?> c : new Class<?>[] { Node.class, NodeList.class }) {
        r.register(new RequiredInvocationPlugin("get" + ClassUtil.getUnqualifiedName(c) + "Unsafe", Node.class, long.class) {

            @Override
            public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset) {
                b.addPush(JavaKind.Object, new UnsafePartitionLoadNode(node, offset, JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
                return true;
            }
        });
        r.register(new RequiredInvocationPlugin("put" + ClassUtil.getUnqualifiedName(c) + "Unsafe", Node.class, long.class, c) {

            @Override
            public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset, ValueNode value) {
                b.add(new UnsafePartitionStoreNode(node, offset, value, JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
                return true;
            }
        });
    }
}
Also used : RequiredInvocationPlugin(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.RequiredInvocationPlugin) UnsafePartitionStoreNode(com.oracle.graal.pointsto.nodes.UnsafePartitionStoreNode) StackValueNode(com.oracle.svm.core.graal.stackvalue.StackValueNode) SubstrateCompressionNode(com.oracle.svm.core.graal.nodes.SubstrateCompressionNode) ZeroExtendNode(org.graalvm.compiler.nodes.calc.ZeroExtendNode) TestDeoptimizeNode(com.oracle.svm.core.graal.nodes.TestDeoptimizeNode) WordCastNode(org.graalvm.compiler.word.WordCastNode) ReadCallerStackPointerNode(com.oracle.svm.core.graal.nodes.ReadCallerStackPointerNode) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) LazyConstantNode(com.oracle.svm.core.graal.nodes.LazyConstantNode) SubstrateObjectCloneWithExceptionNode(com.oracle.svm.core.graal.jdk.SubstrateObjectCloneWithExceptionNode) FixedNode(org.graalvm.compiler.nodes.FixedNode) SubstrateIdentityHashCodeNode(com.oracle.svm.core.identityhashcode.SubstrateIdentityHashCodeNode) FarReturnNode(com.oracle.svm.core.graal.nodes.FarReturnNode) DeoptProxyNode(com.oracle.svm.hosted.nodes.DeoptProxyNode) DynamicNewInstanceNode(org.graalvm.compiler.nodes.java.DynamicNewInstanceNode) SubstrateReflectionGetCallerClassNode(com.oracle.svm.core.graal.nodes.SubstrateReflectionGetCallerClassNode) NarrowNode(org.graalvm.compiler.nodes.calc.NarrowNode) DynamicPiNode(org.graalvm.compiler.nodes.DynamicPiNode) DeoptEntryNode(com.oracle.svm.core.graal.nodes.DeoptEntryNode) VirtualObjectNode(org.graalvm.compiler.nodes.virtual.VirtualObjectNode) AbstractBeginNode(org.graalvm.compiler.nodes.AbstractBeginNode) PiNode(org.graalvm.compiler.nodes.PiNode) LogicNode(org.graalvm.compiler.nodes.LogicNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) EnsureClassInitializedNode(com.oracle.svm.core.classinitialization.EnsureClassInitializedNode) NewArrayNode(org.graalvm.compiler.nodes.java.NewArrayNode) FullInfopointNode(org.graalvm.compiler.nodes.FullInfopointNode) VirtualArrayNode(org.graalvm.compiler.nodes.virtual.VirtualArrayNode) AllocatedObjectNode(org.graalvm.compiler.nodes.virtual.AllocatedObjectNode) InstanceOfDynamicNode(org.graalvm.compiler.nodes.java.InstanceOfDynamicNode) LoadHubNode(org.graalvm.compiler.nodes.extended.LoadHubNode) UnsafePartitionLoadNode(com.oracle.graal.pointsto.nodes.UnsafePartitionLoadNode) StoreIndexedNode(org.graalvm.compiler.nodes.java.StoreIndexedNode) CommitAllocationNode(org.graalvm.compiler.nodes.virtual.CommitAllocationNode) ReadReturnAddressNode(com.oracle.svm.core.graal.nodes.ReadReturnAddressNode) BytecodeExceptionNode(org.graalvm.compiler.nodes.extended.BytecodeExceptionNode) Node(org.graalvm.compiler.graph.Node) UnsafePartitionStoreNode(com.oracle.graal.pointsto.nodes.UnsafePartitionStoreNode) NodeList(org.graalvm.compiler.graph.NodeList) Receiver(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver) Edges(org.graalvm.compiler.graph.Edges) GraphBuilderContext(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext) UnsafePartitionLoadNode(com.oracle.graal.pointsto.nodes.UnsafePartitionLoadNode) Registration(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Registration) StackValueNode(com.oracle.svm.core.graal.stackvalue.StackValueNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) ResolvedJavaMethod(jdk.vm.ci.meta.ResolvedJavaMethod)

Aggregations

UnsafePartitionLoadNode (com.oracle.graal.pointsto.nodes.UnsafePartitionLoadNode)1 UnsafePartitionStoreNode (com.oracle.graal.pointsto.nodes.UnsafePartitionStoreNode)1 EnsureClassInitializedNode (com.oracle.svm.core.classinitialization.EnsureClassInitializedNode)1 SubstrateObjectCloneWithExceptionNode (com.oracle.svm.core.graal.jdk.SubstrateObjectCloneWithExceptionNode)1 DeoptEntryNode (com.oracle.svm.core.graal.nodes.DeoptEntryNode)1 FarReturnNode (com.oracle.svm.core.graal.nodes.FarReturnNode)1 LazyConstantNode (com.oracle.svm.core.graal.nodes.LazyConstantNode)1 ReadCallerStackPointerNode (com.oracle.svm.core.graal.nodes.ReadCallerStackPointerNode)1 ReadReturnAddressNode (com.oracle.svm.core.graal.nodes.ReadReturnAddressNode)1 SubstrateCompressionNode (com.oracle.svm.core.graal.nodes.SubstrateCompressionNode)1 SubstrateReflectionGetCallerClassNode (com.oracle.svm.core.graal.nodes.SubstrateReflectionGetCallerClassNode)1 TestDeoptimizeNode (com.oracle.svm.core.graal.nodes.TestDeoptimizeNode)1 StackValueNode (com.oracle.svm.core.graal.stackvalue.StackValueNode)1 SubstrateIdentityHashCodeNode (com.oracle.svm.core.identityhashcode.SubstrateIdentityHashCodeNode)1 DeoptProxyNode (com.oracle.svm.hosted.nodes.DeoptProxyNode)1 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)1 Edges (org.graalvm.compiler.graph.Edges)1 Node (org.graalvm.compiler.graph.Node)1 NodeList (org.graalvm.compiler.graph.NodeList)1 AbstractBeginNode (org.graalvm.compiler.nodes.AbstractBeginNode)1