public class HotSpotReplacementsImpl extends ReplacementsImpl
ReplacementsImpl.GraphMakerInlineInvokePlugin.InlineInfodefaultBytecodeProvider, graphs, providers, snippetReflection, target| Constructor and Description |
|---|
HotSpotReplacementsImpl(HotSpotProviders providers,
SnippetReflectionProvider snippetReflection,
BytecodeProvider bytecodeProvider,
TargetDescription target) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearSnippetParameterNames() |
void |
closeSnippetRegistration()
Notifies this method that no further snippets will be registered via
Replacements.registerSnippet(ResolvedJavaMethod, ResolvedJavaMethod, java.lang.Object, boolean, org.graalvm.compiler.options.OptionValues)
or Replacements.registerSnippetTemplateCache(org.graalvm.compiler.api.replacements.SnippetTemplateCache). |
boolean |
encode(OptionValues options) |
ResolvedJavaMethod |
findSnippetMethod(ResolvedJavaMethod thisMethod) |
static EncodedSnippets |
getEncodedSnippets() |
<T> T |
getInjectedArgument(Class<T> capability) |
Class<? extends GraphBuilderPlugin> |
getIntrinsifyingPlugin(ResolvedJavaMethod method)
Gets the plugin type that intrinsifies calls to
method. |
HotSpotProviders |
getProviders() |
StructuredGraph |
getSnippet(ResolvedJavaMethod method,
ResolvedJavaMethod original,
Object[] args,
BitSet nonNullParameters,
boolean trackNodeSourcePosition,
NodeSourcePosition replaceePosition,
OptionValues options)
Gets the snippet graph derived from a given method.
|
SnippetParameterInfo |
getSnippetParameterInfo(ResolvedJavaMethod method)
Get the snippet metadata required to inline the snippet.
|
boolean |
isSnippet(ResolvedJavaMethod method)
Return true if the method is a
Snippet. |
void |
maybeInitializeEncoder() |
static MetaAccessProvider |
noticeTypes(MetaAccessProvider metaAccess) |
void |
notifyNotInlined(GraphBuilderContext b,
ResolvedJavaMethod method,
Invoke invoke)
Notifies this plugin of the
Invoke node created for a method that was not inlined per
InlineInvokePlugin.shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext, ResolvedJavaMethod, org.graalvm.compiler.nodes.ValueNode[]). |
void |
registerConditionalPlugin(InvocationPlugin plugin)
Marks a plugin as conditionally applied.
|
void |
registerSnippet(ResolvedJavaMethod method,
ResolvedJavaMethod original,
Object receiver,
boolean trackNodeSourcePosition,
OptionValues options)
Registers a method as snippet.
|
static boolean |
snippetsAreEncoded() |
createGraphMaker, getDefaultReplacementBytecodeProvider, getGraphBuilderPlugins, getInjectedStamp, getInlineSubstitution, getIntrinsicGraph, getSnippetTemplateCache, getWordKind, hasSubstitution, makeGraph, makeGraph, openDebugContext, openSnippetDebugContext, openSnippetDebugContext, registerSnippetTemplateCache, setGraphBuilderPlugins, setProviders, shouldInlineInvokeclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEncodingSnippetsnotifyAfterInline, notifyBeforeInlinepublic HotSpotReplacementsImpl(HotSpotProviders providers, SnippetReflectionProvider snippetReflection, BytecodeProvider bytecodeProvider, TargetDescription target)
public HotSpotProviders getProviders()
getProviders in interface ReplacementsgetProviders in class ReplacementsImplpublic void maybeInitializeEncoder()
public Class<? extends GraphBuilderPlugin> getIntrinsifyingPlugin(ResolvedJavaMethod method)
Replacementsmethod.getIntrinsifyingPlugin in interface ReplacementsgetIntrinsifyingPlugin in class ReplacementsImplpublic void registerConditionalPlugin(InvocationPlugin plugin)
ReplacementsregisterConditionalPlugin in interface ReplacementsregisterConditionalPlugin in class ReplacementsImplpublic void notifyNotInlined(GraphBuilderContext b, ResolvedJavaMethod method, Invoke invoke)
InlineInvokePluginInvoke node created for a method that was not inlined per
InlineInvokePlugin.shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext, ResolvedJavaMethod, org.graalvm.compiler.nodes.ValueNode[]).notifyNotInlined in interface InlineInvokePluginnotifyNotInlined in class ReplacementsImplb - the contextmethod - the method that was not inlinedinvoke - the invoke node created for the call to methodpublic void registerSnippet(ResolvedJavaMethod method,
ResolvedJavaMethod original,
Object receiver,
boolean trackNodeSourcePosition,
OptionValues options)
ReplacementsregisterSnippet in interface ReplacementsregisterSnippet in class ReplacementsImplpublic SnippetParameterInfo getSnippetParameterInfo(ResolvedJavaMethod method)
ReplacementsgetSnippetParameterInfo in interface ReplacementsgetSnippetParameterInfo in class ReplacementsImplpublic boolean isSnippet(ResolvedJavaMethod method)
ReplacementsSnippet.isSnippet in interface ReplacementsisSnippet in class ReplacementsImplpublic void closeSnippetRegistration()
ReplacementsReplacements.registerSnippet(ResolvedJavaMethod, ResolvedJavaMethod, java.lang.Object, boolean, org.graalvm.compiler.options.OptionValues)
or Replacements.registerSnippetTemplateCache(org.graalvm.compiler.api.replacements.SnippetTemplateCache).
This is a hook for an implementation to check for or forbid late registration.public static EncodedSnippets getEncodedSnippets()
public static boolean snippetsAreEncoded()
public void clearSnippetParameterNames()
public boolean encode(OptionValues options)
public StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod original, Object[] args, BitSet nonNullParameters, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition, OptionValues options)
ReplacementsgetSnippet in interface ReplacementsgetSnippet in class ReplacementsImploriginal - XXX always null now?.args - arguments to the snippet if available, otherwise nullmethodpublic <T> T getInjectedArgument(Class<T> capability)
getInjectedArgument in interface GeneratedPluginInjectionProvidergetInjectedArgument in class ReplacementsImplpublic ResolvedJavaMethod findSnippetMethod(ResolvedJavaMethod thisMethod)
public static MetaAccessProvider noticeTypes(MetaAccessProvider metaAccess)