All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jdk.graal.compiler.replacements.nodes.PluginFactory_BinaryMathIntrinsicNode Maven / Gradle / Ivy

There is a newer version: 24.2.1
Show newest version
// CheckStyle: stop header check
// CheckStyle: stop line length check
// GENERATED CONTENT - DO NOT EDIT
// GENERATORS: jdk.graal.compiler.replacements.processor.ReplacementsAnnotationProcessor, jdk.graal.compiler.replacements.processor.PluginGenerator
package jdk.graal.compiler.replacements.nodes;


import java.lang.annotation.Annotation;
import jdk.graal.compiler.core.common.type.Stamp;
import jdk.graal.compiler.graph.NodeInputList;
import jdk.graal.compiler.nodes.PluginReplacementNode;
import jdk.graal.compiler.nodes.ValueNode;
import jdk.graal.compiler.nodes.graphbuilderconf.GeneratedNodeIntrinsicInvocationPlugin;
import jdk.graal.compiler.nodes.graphbuilderconf.GeneratedPluginFactory;
import jdk.graal.compiler.nodes.graphbuilderconf.GeneratedPluginInjectionProvider;
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import jdk.graal.compiler.nodes.graphbuilderconf.InvocationPlugin;
import jdk.graal.compiler.nodes.graphbuilderconf.InvocationPlugins;
import jdk.graal.compiler.nodes.spi.Replacements;
import jdk.graal.compiler.options.ExcludeFromJacocoGeneratedReport;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;

//        class: jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode
//       method: compute(double,double,jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation)
// generated-by: jdk.graal.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
final class Plugin_BinaryMathIntrinsicNode_compute extends GeneratedNodeIntrinsicInvocationPlugin {

    @Override
    public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
        if (!b.isPluginEnabled(this)) {
            return false;
        }
        ValueNode arg0 = args[0];
        ValueNode arg1 = args[1];
        jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation arg2;
        if (args[2].isConstant()) {
            arg2 = snippetReflection/* A SNIPPET_REFLECTION */.asObject(jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation.class, args[2].asJavaConstant());
            assert arg2 != null;
        } else {
            if (b.shouldDeferPlugin(this)) {
                b.replacePlugin(this, targetMethod, args, PluginReplacementNode_BinaryMathIntrinsicNode_compute.FUNCTION);
                return true;
            }
            assert b.canDeferPlugin(this) : b.getClass().toString() + " " + args[2];
            return false;
        }
        jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode node = new jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode(arg0, arg1, arg2);
        b.addPush(JavaKind.Double, node);
        return true;
    }
    @Override
    public Class getSource() {
        return jdk.graal.compiler.graph.Node.NodeIntrinsic.class;
    }

    private final jdk.graal.compiler.api.replacements.SnippetReflectionProvider snippetReflection;

    Plugin_BinaryMathIntrinsicNode_compute(GeneratedPluginInjectionProvider injection) {
        super("compute", double.class, double.class, jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation.class);
        this.snippetReflection = injection.getInjectedArgument(jdk.graal.compiler.api.replacements.SnippetReflectionProvider.class);
    }
}
//        class: jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode
//       method: compute(double,double,jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation)
// generated-by: jdk.graal.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
@ExcludeFromJacocoGeneratedReport("deferred plugin support that is only called in libgraal")
final class PluginReplacementNode_BinaryMathIntrinsicNode_compute implements PluginReplacementNode.ReplacementFunction {
    static PluginReplacementNode.ReplacementFunction FUNCTION = new PluginReplacementNode_BinaryMathIntrinsicNode_compute();

    @Override
    public boolean replace(GraphBuilderContext b, Replacements injection, Stamp stamp, NodeInputList args) {
        ValueNode arg0 = args.get(0);
        ValueNode arg1 = args.get(1);
        jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation arg2;
        if (args.get(2).isConstant()) {
            arg2 = injection.getInjectedArgument(jdk.graal.compiler.api.replacements.SnippetReflectionProvider.class)/* B SNIPPET_REFLECTION */.asObject(jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.BinaryOperation.class, args.get(2).asJavaConstant());
            assert arg2 != null;
        } else {
            return false;
        }
        jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode node = new jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode(arg0, arg1, arg2);
        b.addPush(JavaKind.Double, node);
        return true;
    }
}

public class PluginFactory_BinaryMathIntrinsicNode implements GeneratedPluginFactory {
    @Override
    public void registerPlugins(InvocationPlugins plugins, GeneratedPluginInjectionProvider injection) {
        plugins.register(jdk.graal.compiler.replacements.nodes.BinaryMathIntrinsicNode.class, new Plugin_BinaryMathIntrinsicNode_compute(injection));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy