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;
}
});
}
}
Aggregations