package org.graalvm.compiler.hotspot.replacements;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import java.lang.annotation.Annotation;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import org.graalvm.compiler.nodes.graphbuilderconf.GeneratedInvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
import org.graalvm.compiler.nodes.graphbuilderconf.NodeIntrinsicPluginFactory;
public class PluginFactory_ClassGetHubNode implements NodeIntrinsicPluginFactory {
private static final class ClassGetHubNode_piCastNonNull extends GeneratedInvocationPlugin {
@Override
public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
ValueNode arg0 = args[0];
ValueNode arg1 = args[1];
return org.graalvm.compiler.nodes.PiNode.intrinsify(b, targetMethod, arg0, arg1);
}
@Override
public Class<? extends Annotation> getSource() {
return org.graalvm.compiler.graph.Node.NodeIntrinsic.class;
}
}
private static final class ClassGetHubNode_readClass extends GeneratedInvocationPlugin {
@Override
public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
ValueNode arg0 = args[0];
return org.graalvm.compiler.hotspot.replacements.ClassGetHubNode.intrinsify(b, targetMethod, arg0);
}
@Override
public Class<? extends Annotation> getSource() {
return org.graalvm.compiler.graph.Node.NodeIntrinsic.class;
}
}
@Override
public void registerPlugins(InvocationPlugins plugins, InjectionProvider injection) {
plugins.register(new ClassGetHubNode_piCastNonNull(), org.graalvm.compiler.hotspot.replacements.ClassGetHubNode.class, "piCastNonNull", java.lang.Object.class, org.graalvm.compiler.nodes.extended.GuardingNode.class);
plugins.register(new ClassGetHubNode_readClass(), org.graalvm.compiler.hotspot.replacements.ClassGetHubNode.class, "readClass", java.lang.Class.class);
}
}