
jdk.graal.compiler.hotspot.nodes.PluginFactory_AllocaNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compiler Show documentation
Show all versions of compiler Show documentation
The GraalVM compiler and the Graal-truffle optimizer.
// 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.hotspot.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.options.ExcludeFromJacocoGeneratedReport;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;
// class: jdk.graal.compiler.hotspot.nodes.AllocaNode
// method: alloca(int,int)
// generated-by: jdk.graal.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
final class Plugin_AllocaNode_alloca extends GeneratedNodeIntrinsicInvocationPlugin {
@Override
public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
if (!b.isPluginEnabled(this)) {
return false;
}
jdk.graal.compiler.word.WordTypes arg0 = injectedWordTypes;
int arg1;
if (args[0].isConstant()) {
arg1 = args[0].asJavaConstant().asInt();
} else {
if (b.shouldDeferPlugin(this)) {
b.replacePlugin(this, targetMethod, args, PluginReplacementNode_AllocaNode_alloca.FUNCTION);
return true;
}
assert b.canDeferPlugin(this) : b.getClass().toString() + " " + args[0];
return false;
}
int arg2;
if (args[1].isConstant()) {
arg2 = args[1].asJavaConstant().asInt();
} else {
if (b.shouldDeferPlugin(this)) {
b.replacePlugin(this, targetMethod, args, PluginReplacementNode_AllocaNode_alloca.FUNCTION);
return true;
}
assert b.canDeferPlugin(this) : b.getClass().toString() + " " + args[1];
return false;
}
jdk.graal.compiler.hotspot.nodes.AllocaNode node = new jdk.graal.compiler.hotspot.nodes.AllocaNode(arg0, arg1, arg2);
b.addPush(JavaKind.Object, node);
return true;
}
@Override
public Class extends Annotation> getSource() {
return jdk.graal.compiler.graph.Node.NodeIntrinsic.class;
}
private final jdk.graal.compiler.word.WordTypes injectedWordTypes;
Plugin_AllocaNode_alloca(GeneratedPluginInjectionProvider injection) {
super("alloca", int.class, int.class);
this.injectedWordTypes = injection.getInjectedArgument(jdk.graal.compiler.word.WordTypes.class);
}
}
// class: jdk.graal.compiler.hotspot.nodes.AllocaNode
// method: alloca(int,int)
// generated-by: jdk.graal.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
@ExcludeFromJacocoGeneratedReport("deferred plugin support that is only called in libgraal")
final class PluginReplacementNode_AllocaNode_alloca implements PluginReplacementNode.ReplacementFunction {
static PluginReplacementNode.ReplacementFunction FUNCTION = new PluginReplacementNode_AllocaNode_alloca();
@Override
public boolean replace(GraphBuilderContext b, GeneratedPluginInjectionProvider injection, Stamp stamp, NodeInputList args) {
jdk.graal.compiler.word.WordTypes arg0 = injection.getInjectedArgument(jdk.graal.compiler.word.WordTypes.class);
int arg1;
if (args.get(0).isConstant()) {
arg1 = args.get(0).asJavaConstant().asInt();
} else {
return false;
}
int arg2;
if (args.get(1).isConstant()) {
arg2 = args.get(1).asJavaConstant().asInt();
} else {
return false;
}
jdk.graal.compiler.hotspot.nodes.AllocaNode node = new jdk.graal.compiler.hotspot.nodes.AllocaNode(arg0, arg1, arg2);
b.addPush(JavaKind.Object, node);
return true;
}
}
public class PluginFactory_AllocaNode implements GeneratedPluginFactory {
@Override
public void registerPlugins(InvocationPlugins plugins, GeneratedPluginInjectionProvider injection) {
plugins.register(jdk.graal.compiler.hotspot.nodes.AllocaNode.class, new Plugin_AllocaNode_alloca(injection));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy