< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java
Print this page
*** 31,40 ****
--- 31,41 ----
import org.graalvm.compiler.core.common.CompilationIdentifier;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.graph.NodeSourcePosition;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
+ import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
import org.graalvm.compiler.options.OptionValues;
import jdk.vm.ci.meta.ResolvedJavaMethod;
*** 50,59 ****
--- 51,65 ----
* bytecode into a graph.
*/
GraphBuilderConfiguration.Plugins getGraphBuilderPlugins();
/**
+ * Gets the plugin type that intrinsifies calls to {@code method}.
+ */
+ Class<? extends GraphBuilderPlugin> getIntrinsifyingPlugin(ResolvedJavaMethod method);
+
+ /**
* Gets the snippet graph derived from a given method.
*
* @param args arguments to the snippet if available, otherwise {@code null}
* @param trackNodeSourcePosition
* @return the snippet graph, if any, that is derived from {@code method}
*** 73,83 ****
StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod recursiveEntry, Object[] args, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition);
/**
* Registers a method as snippet.
*/
! void registerSnippet(ResolvedJavaMethod method, boolean trackNodeSourcePosition);
/**
* Gets a graph that is a substitution for a given method.
*
* @param invokeBci the call site BCI if this request is made for inlining a substitute
--- 79,89 ----
StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod recursiveEntry, Object[] args, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition);
/**
* Registers a method as snippet.
*/
! void registerSnippet(ResolvedJavaMethod method, ResolvedJavaMethod original, Object receiver, boolean trackNodeSourcePosition);
/**
* Gets a graph that is a substitution for a given method.
*
* @param invokeBci the call site BCI if this request is made for inlining a substitute
*** 136,141 ****
--- 142,156 ----
/**
* Get snippet templates that were registered with
* {@link Replacements#registerSnippetTemplateCache(SnippetTemplateCache)}.
*/
<T extends SnippetTemplateCache> T getSnippetTemplateCache(Class<T> templatesClass);
+
+ /**
+ * Notifies this method that no further snippets will be registered via {@link #registerSnippet}
+ * or {@link #registerSnippetTemplateCache}.
+ *
+ * This is a hook for an implementation to check for or forbid late registration.
+ */
+ default void closeSnippetRegistration() {
+ }
}
< prev index next >