use of org.graalvm.compiler.nodes.BreakpointNode in project graal by oracle.
the class GraalCompilerTest method registerInvocationPlugins.
/**
* Registers extra invocation plugins for this test. The extra plugins are removed in the
* {@link #afterTest()} method.
*
* Subclasses overriding this method should always call the same method on the super class in
* case it wants to register plugins.
*
* @param invocationPlugins
*/
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
invocationPlugins.register(new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
b.add(new BreakpointNode());
return true;
}
}, GraalCompilerTest.class, "breakpoint");
invocationPlugins.register(new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg0) {
b.add(new BreakpointNode(arg0));
return true;
}
}, GraalCompilerTest.class, "breakpoint", int.class);
invocationPlugins.register(new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
b.add(new NotOptimizedNode());
return true;
}
}, GraalCompilerTest.class, "shouldBeOptimizedAway");
}
Aggregations