public abstract class AnalysisMethod extends AnalysisElement implements WrappedJavaMethod, GraphProvider, OriginalMethodProvider, com.oracle.svm.common.meta.MultiMethod
| Modifier and Type | Class and Description |
|---|---|
static class |
AnalysisMethod.Signature |
AnalysisElement.ElementNotification, AnalysisElement.MethodOverrideReachableNotification, AnalysisElement.ReachabilityReason, AnalysisElement.ReachabilityTraceBuilder, AnalysisElement.SubtypeReachableNotificationGraphProvider.Purpose| Modifier and Type | Field and Description |
|---|---|
protected AnalysisType |
declaringClass |
protected AnalysisMethod[] |
implementations
All concrete methods that can actually be called when calling this method.
|
ResolvedJavaMethod |
wrapped |
| Modifier | Constructor and Description |
|---|---|
protected |
AnalysisMethod(AnalysisMethod original,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey multiMethodKey) |
protected |
AnalysisMethod(AnalysisUniverse universe,
ResolvedJavaMethod wrapped,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey multiMethodKey,
Map<com.oracle.svm.common.meta.MultiMethod.MultiMethodKey,com.oracle.svm.common.meta.MultiMethod> multiMethodMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowRuntimeCompilation()
Returns true if a graph can be provided for
GraphProvider.Purpose.PREPARE_RUNTIME_COMPILATION. |
StackTraceElement |
asStackTraceElement(int bci) |
org.graalvm.compiler.nodes.StructuredGraph |
buildGraph(org.graalvm.compiler.debug.DebugContext debug,
ResolvedJavaMethod method,
HostedProviders providers,
GraphProvider.Purpose purpose) |
boolean |
canBeInlined() |
boolean |
canBeStaticallyBound() |
void |
cleanupAfterAnalysis() |
protected abstract AnalysisMethod |
createMultiMethod(AnalysisMethod analysisMethod,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey newMultiMethodKey) |
org.graalvm.compiler.nodes.StructuredGraph |
decodeAnalyzedGraph(org.graalvm.compiler.debug.DebugContext debug,
Iterable<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference> nodeReferences)
Returns the
Graal IR for the method that has been processed by the
static analysis. |
AnalysisParsedGraph |
ensureGraphParsed(BigBang bb)
Ensures that the method has been parsed, i.e., that the
Graal IR for
the method is available. |
boolean |
equals(Object obj) |
Collection<com.oracle.svm.common.meta.MultiMethod> |
getAllMultiMethods() |
org.graalvm.compiler.nodes.EncodedGraph |
getAnalyzedGraph() |
Set<AnalysisMethod> |
getCallers()
Get the set of all callers for this method, as inferred by the static analysis.
|
byte[] |
getCode() |
int |
getCodeSize() |
ConstantPool |
getConstantPool() |
AnalysisType |
getDeclaringClass() |
Constant |
getEncoding() |
Object |
getEntryPointData() |
ExceptionHandler[] |
getExceptionHandlers() |
Type[] |
getGenericParameterTypes() |
int |
getId() |
protected Object |
getImplementationInvokedReason() |
AnalysisMethod[] |
getImplementations() |
protected Object |
getInlinedReason() |
Object |
getIntrinsicMethodReason() |
protected Object |
getInvokedReason() |
abstract List<BytecodePosition> |
getInvokeLocations()
Get the list of all invoke locations for this method, as inferred by the static analysis.
|
abstract Iterable<? extends InvokeInfo> |
getInvokes() |
Executable |
getJavaMethod() |
LineNumberTable |
getLineNumberTable() |
LocalVariableTable |
getLocalVariableTable() |
int |
getMaxLocals() |
int |
getMaxStackSize() |
int |
getModifiers() |
AnalysisMethod |
getMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key) |
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey |
getMultiMethodKey() |
String |
getName() |
AnalysisMethod |
getOrCreateMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key) |
AnalysisMethod |
getOrCreateMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key,
Consumer<AnalysisMethod> createAction) |
Annotation[][] |
getParameterAnnotations() |
Parameter[] |
getParameters() |
StackTraceElement[] |
getParsingContext() |
abstract Object |
getParsingReason() |
ProfilingInfo |
getProfilingInfo(boolean includeNormal,
boolean includeOSR) |
String |
getQualifiedName() |
boolean |
getReturnsAllInstantiatedTypes() |
WrappedSignature |
getSignature() |
SpeculationLog |
getSpeculationLog() |
protected AnalysisUniverse |
getUniverse() |
ResolvedJavaMethod |
getWrapped() |
int |
hashCode() |
boolean |
hasNeverInlineDirective() |
boolean |
isBridge() |
boolean |
isClassInitializer() |
boolean |
isConstructor() |
boolean |
isDefault() |
boolean |
isDirectRootMethod()
Returns true if the method is marked as direct root.
|
boolean |
isEntryPoint() |
abstract boolean |
isImplementationInvokable() |
boolean |
isImplementationInvoked()
Returns true if the method body can ever be executed.
|
boolean |
isInlined() |
boolean |
isIntrinsicMethod() |
boolean |
isInVirtualMethodTable(ResolvedJavaType resolved) |
boolean |
isInvoked()
Returns true if this method is ever used as the target of a call site.
|
boolean |
isReachable() |
boolean |
isSimplyImplementationInvoked() |
boolean |
isSynthetic() |
boolean |
isTriggered()
Return true if reachability handlers should be executed for this element.
|
boolean |
isVarArgs() |
boolean |
isVirtualRootMethod()
Returns true if the method is marked as virtual root.
|
protected void |
notifyImplementationInvokedCallbacks() |
protected void |
notifyMethodOverride(AnalysisMethod override) |
void |
onImplementationInvoked() |
void |
onReachable() |
boolean |
registerAsDirectRootMethod(Object reason)
Registers this method as a direct (special or static) root for the analysis.
|
void |
registerAsEntryPoint(Object newEntryPointData) |
boolean |
registerAsImplementationInvoked(Object reason) |
void |
registerAsInlined(Object reason) |
void |
registerAsIntrinsicMethod(Object reason)
Registers this method as intrinsified to Graal nodes via a
graph
builder plugin. |
boolean |
registerAsInvoked(Object reason) |
boolean |
registerAsVirtualRootMethod(Object reason)
Registers this method as a virtual root for the analysis.
|
void |
registerImplementationInvokedCallback(Consumer<org.graalvm.nativeimage.hosted.Feature.DuringAnalysisAccess> callback) |
void |
registerOverrideReachabilityNotification(AnalysisElement.MethodOverrideReachableNotification notification) |
AnalysisParsedGraph |
reparseGraph(BigBang bb)
Forces the graph to be reparsed and the reparsing to be done by this thread.
|
void |
reprofile() |
protected AnalysisMethod |
resolveInType(AnalysisType holder)
Resolves this method in the provided type, but only if the type or any of its subtypes is
marked as instantiated.
|
protected AnalysisMethod |
resolveInType(AnalysisType holder,
boolean holderOrSubtypeInstantiated) |
void |
setAnalyzedGraph(org.graalvm.compiler.nodes.EncodedGraph analyzedGraph) |
void |
setReturnsAllInstantiatedTypes()
This should only be set via calling
FeatureImpl.BeforeAnalysisAccessImpl#registerOpaqueMethodReturn. |
boolean |
shouldBeInlined() |
abstract void |
startTrackInvocations() |
String |
toString() |
execute, getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, isAnnotationPresent, notifyReachabilityCallback, notifyReachabilityCallbacks, registerReachabilityNotificationgetJavaMethodisDeoptTarget, isDeoptTarget, isOriginalMethod, isOriginalMethodgetAnnotationsByType, getDeclaredAnnotationsByTypepublic final ResolvedJavaMethod wrapped
protected final AnalysisType declaringClass
protected AnalysisMethod[] implementations
protected AnalysisMethod(AnalysisUniverse universe, ResolvedJavaMethod wrapped, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey multiMethodKey, Map<com.oracle.svm.common.meta.MultiMethod.MultiMethodKey,com.oracle.svm.common.meta.MultiMethod> multiMethodMap)
protected AnalysisMethod(AnalysisMethod original, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey multiMethodKey)
public String getQualifiedName()
protected AnalysisUniverse getUniverse()
getUniverse in class AnalysisElementpublic void cleanupAfterAnalysis()
public abstract void startTrackInvocations()
public abstract Iterable<? extends InvokeInfo> getInvokes()
public abstract Object getParsingReason()
public final StackTraceElement[] getParsingContext()
public int getId()
public void registerAsIntrinsicMethod(Object reason)
graph
builder plugin. Such a method is treated similar to an invoked method. For example, method
resolution must be able to find the method (otherwise the intrinsification would not work).public void registerAsEntryPoint(Object newEntryPointData)
public boolean registerAsInvoked(Object reason)
public boolean registerAsImplementationInvoked(Object reason)
public void registerAsInlined(Object reason)
public void registerImplementationInvokedCallback(Consumer<org.graalvm.nativeimage.hosted.Feature.DuringAnalysisAccess> callback)
protected void notifyImplementationInvokedCallbacks()
public Set<AnalysisMethod> getCallers()
public abstract List<BytecodePosition> getInvokeLocations()
public boolean isEntryPoint()
public Object getEntryPointData()
public boolean isIntrinsicMethod()
public Object getIntrinsicMethodReason()
public boolean registerAsVirtualRootMethod(Object reason)
AnalysisMethod.registerAsImplementationInvoked(Object).public boolean registerAsDirectRootMethod(Object reason)
public boolean isVirtualRootMethod()
public boolean isDirectRootMethod()
public boolean isSimplyImplementationInvoked()
public boolean isInvoked()
protected Object getInvokedReason()
public boolean isImplementationInvoked()
protected Object getImplementationInvokedReason()
public boolean isInlined()
protected Object getInlinedReason()
public boolean isReachable()
isReachable in class AnalysisElementpublic boolean isTriggered()
AnalysisElementisTriggered in class AnalysisElementpublic void onImplementationInvoked()
public void onReachable()
onReachable in class AnalysisElementprotected void notifyMethodOverride(AnalysisMethod override)
public void registerOverrideReachabilityNotification(AnalysisElement.MethodOverrideReachableNotification notification)
protected AnalysisMethod resolveInType(AnalysisType holder)
protected AnalysisMethod resolveInType(AnalysisType holder, boolean holderOrSubtypeInstantiated)
public ResolvedJavaMethod getWrapped()
getWrapped in interface WrappedElementgetWrapped in interface WrappedJavaMethodgetWrapped in class AnalysisElementpublic String getName()
public WrappedSignature getSignature()
public org.graalvm.compiler.nodes.StructuredGraph buildGraph(org.graalvm.compiler.debug.DebugContext debug,
ResolvedJavaMethod method,
HostedProviders providers,
GraphProvider.Purpose purpose)
buildGraph in interface GraphProviderpublic boolean allowRuntimeCompilation()
GraphProviderGraphProvider.Purpose.PREPARE_RUNTIME_COMPILATION. Note
that a manually generated graph must be able to provide the proper deoptimization entry
points and deoptimization frame states.allowRuntimeCompilation in interface GraphProviderpublic byte[] getCode()
public int getCodeSize()
public AnalysisType getDeclaringClass()
public int getMaxLocals()
public int getMaxStackSize()
public Parameter[] getParameters()
public int getModifiers()
public boolean isSynthetic()
public boolean isVarArgs()
public boolean isBridge()
public boolean isClassInitializer()
public boolean isConstructor()
public boolean canBeStaticallyBound()
public AnalysisMethod[] getImplementations()
public ExceptionHandler[] getExceptionHandlers()
public StackTraceElement asStackTraceElement(int bci)
public ProfilingInfo getProfilingInfo(boolean includeNormal,
boolean includeOSR)
public ConstantPool getConstantPool()
public Annotation[][] getParameterAnnotations()
public Type[] getGenericParameterTypes()
public boolean canBeInlined()
public boolean hasNeverInlineDirective()
public boolean shouldBeInlined()
public LineNumberTable getLineNumberTable()
public LocalVariableTable getLocalVariableTable()
public void reprofile()
public Constant getEncoding()
public boolean isInVirtualMethodTable(ResolvedJavaType resolved)
public boolean isDefault()
public SpeculationLog getSpeculationLog()
public Executable getJavaMethod()
getJavaMethod in interface OriginalMethodProviderpublic AnalysisParsedGraph reparseGraph(BigBang bb)
public AnalysisParsedGraph ensureGraphParsed(BigBang bb)
Graal IR for
the method is available.public org.graalvm.compiler.nodes.StructuredGraph decodeAnalyzedGraph(org.graalvm.compiler.debug.DebugContext debug,
Iterable<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference> nodeReferences)
Graal IR for the method that has been processed by the
static analysis.public void setAnalyzedGraph(org.graalvm.compiler.nodes.EncodedGraph analyzedGraph)
public org.graalvm.compiler.nodes.EncodedGraph getAnalyzedGraph()
public com.oracle.svm.common.meta.MultiMethod.MultiMethodKey getMultiMethodKey()
getMultiMethodKey in interface com.oracle.svm.common.meta.MultiMethodpublic AnalysisMethod getOrCreateMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key)
getOrCreateMultiMethod in interface com.oracle.svm.common.meta.MultiMethodpublic AnalysisMethod getMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key)
getMultiMethod in interface com.oracle.svm.common.meta.MultiMethodpublic Collection<com.oracle.svm.common.meta.MultiMethod> getAllMultiMethods()
getAllMultiMethods in interface com.oracle.svm.common.meta.MultiMethodpublic AnalysisMethod getOrCreateMultiMethod(com.oracle.svm.common.meta.MultiMethod.MultiMethodKey key, Consumer<AnalysisMethod> createAction)
public void setReturnsAllInstantiatedTypes()
FeatureImpl.BeforeAnalysisAccessImpl#registerOpaqueMethodReturn.public boolean getReturnsAllInstantiatedTypes()
protected abstract AnalysisMethod createMultiMethod(AnalysisMethod analysisMethod, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey newMultiMethodKey)
public abstract boolean isImplementationInvokable()