use of com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionLoadNode in project graal by oracle.
the class SubstrateGraphBuilderPlugins method registerEdgesPlugins.
private static void registerEdgesPlugins(MetaAccessProvider metaAccess, InvocationPlugins plugins, boolean analysis) {
if (analysis) {
Registration r = new Registration(plugins, Edges.class).setAllowOverwrite(true);
for (Class<?> c : new Class<?>[] { Node.class, NodeList.class }) {
r.register2("get" + c.getSimpleName() + "Unsafe", Node.class, long.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset) {
b.addPush(JavaKind.Object, new //
AnalysisUnsafePartitionLoadNode(//
node, //
offset, //
JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
return true;
}
});
r.register3("put" + c.getSimpleName() + "Unsafe", Node.class, long.class, c, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset, ValueNode value) {
b.add(new AnalysisUnsafePartitionStoreNode(node, offset, value, JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
return true;
}
});
}
}
}
Aggregations