public class DelegatingReplacements extends Object implements Replacements
| Modifier and Type | Field and Description |
|---|---|
protected Replacements |
delegate |
| Constructor and Description |
|---|
DelegatingReplacements(Replacements delegate) |
| Modifier and Type | Method and Description |
|---|---|
BytecodeProvider |
getDefaultReplacementBytecodeProvider()
Gets the provider for accessing the bytecode of a substitution method if no other provider is
associated with the substitution method.
|
GraphBuilderConfiguration.Plugins |
getGraphBuilderPlugins()
Gets the object managing the various graph builder plugins used by this object when parsing
bytecode into a graph.
|
<T> T |
getInjectedArgument(Class<T> type) |
Stamp |
getInjectedStamp(Class<?> type,
boolean nonNull)
Gets a stamp denoting a given type and non-nullness property.
|
StructuredGraph |
getInlineSubstitution(ResolvedJavaMethod method,
int invokeBci,
Invoke.InlineControl inlineControl,
boolean trackNodeSourcePosition,
NodeSourcePosition replaceePosition,
StructuredGraph.AllowAssumptions allowAssumptions,
OptionValues options)
Gets a graph that is a substitution for a given method.
|
StructuredGraph |
getIntrinsicGraph(ResolvedJavaMethod method,
CompilationIdentifier compilationId,
DebugContext debug,
StructuredGraph.AllowAssumptions allowAssumptions,
Cancellable cancellable)
Gets a graph produced from the intrinsic for a given method that can be compiled and
installed for the method.
|
Class<? extends GraphBuilderPlugin> |
getIntrinsifyingPlugin(ResolvedJavaMethod method)
Gets the plugin type that intrinsifies calls to
method. |
CoreProviders |
getProviders() |
StructuredGraph |
getSnippet(ResolvedJavaMethod method,
ResolvedJavaMethod recursiveEntry,
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.
|
<T extends SnippetTemplateCache> |
getSnippetTemplateCache(Class<T> templatesClass)
Get snippet templates that were registered with
Replacements.registerSnippetTemplateCache(SnippetTemplateCache). |
JavaKind |
getWordKind()
Gets the JavaKind corresponding to word values.
|
boolean |
hasSubstitution(ResolvedJavaMethod method,
OptionValues options)
Determines if there may be a
substitution graph for a given method.
|
boolean |
isEncodingSnippets()
Returns
true if this Replacements is being used for preparation of snippets
and substitutions for libgraal. |
boolean |
isSnippet(ResolvedJavaMethod method)
Return true if the method is a
Snippet. |
DebugContext |
openSnippetDebugContext(DebugContext.Description description,
DebugContext outer,
OptionValues options)
Create a
DebugContext for use with Snippet related work. |
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.
|
void |
registerSnippetTemplateCache(SnippetTemplateCache snippetTemplates)
Register snippet templates.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseSnippetRegistrationprotected final Replacements delegate
public DelegatingReplacements(Replacements delegate)
public CoreProviders getProviders()
getProviders in interface Replacementspublic <T> T getInjectedArgument(Class<T> type)
getInjectedArgument in interface GeneratedPluginInjectionProviderpublic Stamp getInjectedStamp(Class<?> type, boolean nonNull)
GeneratedPluginInjectionProvidergetInjectedStamp in interface GeneratedPluginInjectionProvidertype - the type the returned stamp representsnonNull - specifies if the returned stamp denotes a value that is guaranteed to be
non-nullpublic GraphBuilderConfiguration.Plugins getGraphBuilderPlugins()
ReplacementsgetGraphBuilderPlugins in interface Replacementspublic Class<? extends GraphBuilderPlugin> getIntrinsifyingPlugin(ResolvedJavaMethod method)
Replacementsmethod.getIntrinsifyingPlugin in interface Replacementspublic DebugContext openSnippetDebugContext(DebugContext.Description description, DebugContext outer, OptionValues options)
ReplacementsDebugContext for use with Snippet related work. Snippet processingis
hidden by default using the flags DebugStubsAndSnippets.openSnippetDebugContext in interface Replacementspublic StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod recursiveEntry, Object[] args, BitSet nonNullParameters, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition, OptionValues options)
ReplacementsgetSnippet in interface ReplacementsrecursiveEntry - XXX always null now?.args - arguments to the snippet if available, otherwise nullmethodpublic SnippetParameterInfo getSnippetParameterInfo(ResolvedJavaMethod method)
ReplacementsgetSnippetParameterInfo in interface Replacementspublic boolean isSnippet(ResolvedJavaMethod method)
ReplacementsSnippet.isSnippet in interface Replacementspublic boolean isEncodingSnippets()
Replacementstrue if this Replacements is being used for preparation of snippets
and substitutions for libgraal.isEncodingSnippets in interface Replacementspublic void registerSnippet(ResolvedJavaMethod method,
ResolvedJavaMethod original,
Object receiver,
boolean trackNodeSourcePosition,
OptionValues options)
ReplacementsregisterSnippet in interface Replacementspublic void registerConditionalPlugin(InvocationPlugin plugin)
ReplacementsregisterConditionalPlugin in interface Replacementspublic StructuredGraph getInlineSubstitution(ResolvedJavaMethod method, int invokeBci, Invoke.InlineControl inlineControl, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition, StructuredGraph.AllowAssumptions allowAssumptions, OptionValues options)
ReplacementsgetInlineSubstitution in interface ReplacementsinvokeBci - the call site BCI for the substitutionmethodpublic StructuredGraph getIntrinsicGraph(ResolvedJavaMethod method, CompilationIdentifier compilationId, DebugContext debug, StructuredGraph.AllowAssumptions allowAssumptions, Cancellable cancellable)
ReplacementsgetIntrinsicGraph in interface Replacementsmethod or nullpublic boolean hasSubstitution(ResolvedJavaMethod method,
OptionValues options)
ReplacementsReplacements.getInlineSubstitution(ResolvedJavaMethod, int, org.graalvm.compiler.nodes.Invoke.InlineControl, boolean, org.graalvm.compiler.graph.NodeSourcePosition, org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions, org.graalvm.compiler.options.OptionValues) may still return null for method and
substitution may be based on an InvocationPlugin that returns false for
InvocationPlugin.execute(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext, ResolvedJavaMethod, org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver, org.graalvm.compiler.nodes.ValueNode[]) making it impossible to create a substitute graph.hasSubstitution in interface Replacementsmethodpublic BytecodeProvider getDefaultReplacementBytecodeProvider()
ReplacementsgetDefaultReplacementBytecodeProvider in interface Replacementspublic void registerSnippetTemplateCache(SnippetTemplateCache snippetTemplates)
ReplacementsregisterSnippetTemplateCache in interface Replacementspublic <T extends SnippetTemplateCache> T getSnippetTemplateCache(Class<T> templatesClass)
ReplacementsReplacements.registerSnippetTemplateCache(SnippetTemplateCache).getSnippetTemplateCache in interface Replacementspublic JavaKind getWordKind()
ReplacementsgetWordKind in interface Replacements