protected class PEGraphDecoder.PENonAppendGraphBuilderContext extends CoreProvidersDelegate implements GraphBuilderContext
GraphBuilderContext.ExternalInliningContext| Modifier and Type | Field and Description |
|---|---|
protected Invoke |
invoke |
protected PEGraphDecoder.PEMethodScope |
methodScope |
| Constructor and Description |
|---|
PENonAppendGraphBuilderContext(PEGraphDecoder.PEMethodScope methodScope,
Invoke invoke) |
| Modifier and Type | Method and Description |
|---|---|
<T extends ValueNode> |
append(T value)
Adds the given node to the graph and also adds recursively all referenced inputs.
|
BailoutException |
bailout(String string) |
int |
bci()
Gets the index of the bytecode instruction currently being parsed.
|
boolean |
canDeferPlugin(GeneratedInvocationPlugin plugin)
Fold and Node.NodeIntrinsic can be deferred during parsing/decoding. |
Bytecode |
getCode()
Gets the code being parsed.
|
int |
getDepth()
Gets the inline depth of this context.
|
GraphBuilderContext.ExternalInliningContext |
getExternalInliningContext() |
StructuredGraph |
getGraph()
Gets the graph being constructed.
|
IntrinsicContext |
getIntrinsic()
Gets the intrinsic of the current parsing context or
null if not
parsing an intrinsic. |
CallTargetNode.InvokeKind |
getInvokeKind()
Gets the kind of invocation currently being parsed.
|
JavaType |
getInvokeReturnType()
Gets the return type of the invocation currently being parsed.
|
ResolvedJavaMethod |
getMethod()
Gets the method being parsed by this context.
|
GraphBuilderContext |
getParent()
Gets the parsing context for the method that inlines the method being parsed by this context.
|
Invoke |
handleReplacedInvoke(CallTargetNode.InvokeKind invokeKind,
ResolvedJavaMethod targetMethod,
ValueNode[] args,
boolean inlineEverything)
Handles an invocation that a plugin determines can replace the original invocation (i.e., the
one for which the plugin was applied).
|
void |
handleReplacedInvoke(CallTargetNode callTarget,
JavaKind resultType) |
boolean |
isParsingInvocationPlugin() |
boolean |
needsExplicitException() |
void |
push(JavaKind kind,
ValueNode value)
Pushes a given value to the frame state stack using an explicit kind.
|
int |
recursiveInliningDepth(ResolvedJavaMethod method)
Computes the recursive inlining depth of the provided method, i.e., counts how often the
provided method is already in the
GraphBuilderContext.getParent() chain starting at this context. |
void |
setStateAfter(StateSplit stateSplit)
Creates a snap shot of the current frame state with the BCI of the instruction after the one
currently being parsed and assigns it to a given side
effect node.
|
String |
toString() |
getConstantFieldProvider, getConstantReflection, getForeignCalls, getLoopsDataProvider, getLowerer, getMetaAccess, getMetaAccessExtensionProvider, getPlatformConfigurationProvider, getProviders, getReplacements, getStampProvider, getWordVerificationclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addNonNullCast, addPush, allowDeoptInPlugins, bciCanBeDuplicated, canMergeIntrinsicReturns, emitBytecodeExceptionCheck, genCheckcastDynamic, genExplicitExceptionEdge, getInvocationPluginBeforeState, getInvocationPluginReturnState, getInvokeReturnStamp, getNonIntrinsicAncestor, intrinsicRangeCheck, invokeFallback, isPluginEnabled, maskSubWordValue, maybeEmitExplicitDivisionByZeroCheck, maybeEmitExplicitNegativeArraySizeCheck, maybeEmitExplicitNegativeArraySizeCheck, nullCheckedValue, nullCheckedValue, parsingIntrinsic, pop, popArguments, replacePlugin, replacePluginWithExceptiongetAssumptions, getDebug, getOptions, shouldDeferPlugingetConstantFieldProvider, getConstantReflection, getForeignCalls, getLoopsDataProvider, getLowerer, getMetaAccess, getMetaAccessExtensionProvider, getPlatformConfigurationProvider, getReplacements, getStampProvider, getWordVerificationprotected final PEGraphDecoder.PEMethodScope methodScope
protected final Invoke invoke
public PENonAppendGraphBuilderContext(PEGraphDecoder.PEMethodScope methodScope, Invoke invoke)
public GraphBuilderContext.ExternalInliningContext getExternalInliningContext()
getExternalInliningContext in interface GraphBuilderContextpublic boolean needsExplicitException()
needsExplicitException in interface GraphBuilderContextpublic boolean isParsingInvocationPlugin()
isParsingInvocationPlugin in interface GraphBuilderContextpublic boolean canDeferPlugin(GeneratedInvocationPlugin plugin)
Fold and Node.NodeIntrinsic can be deferred during parsing/decoding. Only by
the end of Snippet instantiation do they need to
have been processed.
This is how SVM handles snippets. They are parsed with plugins disabled and then encoded
and stored in the image. When the snippet is needed at runtime the graph is decoded and
the plugins are run during the decoding process. If they aren't handled at this point
then they will never be handled.canDeferPlugin in interface GraphBuilderToolpublic BailoutException bailout(String string)
bailout in interface GraphBuilderContextpublic StructuredGraph getGraph()
GraphBuilderToolgetGraph in interface GraphBuilderToolpublic int getDepth()
GraphBuilderContextgetDepth in interface GraphBuilderContextpublic int recursiveInliningDepth(ResolvedJavaMethod method)
GraphBuilderContextGraphBuilderContext.getParent() chain starting at this context.recursiveInliningDepth in interface GraphBuilderContextpublic IntrinsicContext getIntrinsic()
GraphBuilderContextnull if not
parsing an intrinsic.getIntrinsic in interface GraphBuilderContextpublic <T extends ValueNode> T append(T value)
GraphBuilderToolappend in interface GraphBuilderToolvalue - the node to be added to the graphpublic void push(JavaKind kind,
ValueNode value)
GraphBuilderContextvalue.getJavaKind() is different from the kind that the bytecode instruction
currently being parsed pushes to the stack.push in interface GraphBuilderContextkind - the kind to use when type checking this operationvalue - the value to push to the stack. The value must already have been
appended.public Invoke handleReplacedInvoke(CallTargetNode.InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] args, boolean inlineEverything)
GraphBuilderContexthandleReplacedInvoke in interface GraphBuilderContextinvokeKind - the kind of the replacement invocationtargetMethod - the target of the replacement invocationargs - the arguments to the replacement invocationinlineEverything - specifies if all invocations encountered in the scope of
handling the replaced invoke are to be force inlinedpublic void handleReplacedInvoke(CallTargetNode callTarget, JavaKind resultType)
handleReplacedInvoke in interface GraphBuilderContextpublic void setStateAfter(StateSplit stateSplit)
GraphBuilderContextsetStateAfter in interface GraphBuilderContextstateSplit - a side effect node just appended to the graphpublic GraphBuilderContext getParent()
GraphBuilderContextgetParent in interface GraphBuilderContextpublic Bytecode getCode()
GraphBuilderContextgetCode in interface GraphBuilderContextpublic ResolvedJavaMethod getMethod()
GraphBuilderContextgetMethod in interface GraphBuilderContextpublic int bci()
GraphBuilderContextbci in interface GraphBuilderContextpublic CallTargetNode.InvokeKind getInvokeKind()
GraphBuilderContextgetInvokeKind in interface GraphBuilderContextpublic JavaType getInvokeReturnType()
GraphBuilderContextgetInvokeReturnType in interface GraphBuilderContext