public final class HotSpotNodePlugin extends Object implements NodePlugin, TypePlugin
Word-type rewriting for intrinsic
functions (snippets and method substitutions), by forwarding to the WordOperationPlugin.
Note that we forward the NodePlugin and TypePlugin methods, but not the
InlineInvokePlugin methods implemented by WordOperationPlugin. The latter is not
necessary because HotSpot only uses the Word type in methods that are force-inlined,
i.e., there are never non-inlined invokes that involve the Word type.| Modifier and Type | Field and Description |
|---|---|
protected WordOperationPlugin |
wordOperationPlugin |
| Constructor and Description |
|---|
HotSpotNodePlugin(WordOperationPlugin wordOperationPlugin) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canChangeStackKind(GraphBuilderContext b)
If the plugin
pushes a value with a different
JavaKind than specified by the bytecode, it must override this method and return
true. |
boolean |
handleCheckCast(GraphBuilderContext b,
ValueNode object,
ResolvedJavaType type,
JavaTypeProfile profile)
Handle the parsing of a CHECKCAST bytecode.
|
boolean |
handleInstanceOf(GraphBuilderContext b,
ValueNode object,
ResolvedJavaType type,
JavaTypeProfile profile)
Handle the parsing of a INSTANCEOF bytecode.
|
boolean |
handleInvoke(GraphBuilderContext b,
ResolvedJavaMethod method,
ValueNode[] args)
Handle the parsing of a method invocation bytecode to a method that can be bound statically.
|
boolean |
handleLoadField(GraphBuilderContext b,
ValueNode object,
ResolvedJavaField field)
Handle the parsing of a GETFIELD bytecode.
|
boolean |
handleLoadIndexed(GraphBuilderContext b,
ValueNode array,
ValueNode index,
GuardingNode boundsCheck,
JavaKind elementKind)
Handle the parsing of an array load bytecode.
|
boolean |
handleLoadStaticField(GraphBuilderContext b,
ResolvedJavaField field)
Handle the parsing of a GETSTATIC bytecode.
|
boolean |
handleStoreField(GraphBuilderContext b,
ValueNode object,
ResolvedJavaField field,
ValueNode value)
Handle the parsing of a PUTFIELD bytecode.
|
boolean |
handleStoreIndexed(GraphBuilderContext b,
ValueNode array,
ValueNode index,
GuardingNode boundsCheck,
GuardingNode storeCheck,
JavaKind elementKind,
ValueNode value)
Handle the parsing of an array store bytecode.
|
boolean |
handleStoreStaticField(GraphBuilderContext b,
ResolvedJavaField field,
ValueNode value)
Handle the parsing of a PUTSTATIC bytecode.
|
StampPair |
interceptType(GraphBuilderTool b,
JavaType declaredType,
boolean nonNull)
Intercept the type of arguments or return values.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertInvokeDynamic, handleNewArray, handleNewInstance, handleNewMultiArray, instrumentExceptionDispatchprotected final WordOperationPlugin wordOperationPlugin
public HotSpotNodePlugin(WordOperationPlugin wordOperationPlugin)
public boolean canChangeStackKind(GraphBuilderContext b)
NodePluginpushes a value with a different
JavaKind than specified by the bytecode, it must override this method and return
true. This disables assertion checking for value kinds.canChangeStackKind in interface NodePluginb - the contextpublic StampPair interceptType(GraphBuilderTool b, JavaType declaredType, boolean nonNull)
TypePlugininterceptType in interface TypePluginpublic boolean handleInvoke(GraphBuilderContext b, ResolvedJavaMethod method, ValueNode[] args)
NodePluginpush a value as the
result of the method invocation using the return kind of the
method.handleInvoke in interface NodePluginb - the contextmethod - the statically bound, invoked methodargs - the arguments of the method invocationpublic boolean handleLoadField(GraphBuilderContext b, ValueNode object, ResolvedJavaField field)
NodePluginpush a value using the
kind of the field.handleLoadField in interface NodePluginb - the contextobject - the receiver object for the field accessfield - the accessed fieldpublic boolean handleLoadStaticField(GraphBuilderContext b, ResolvedJavaField field)
NodePluginpush a value using the
kind of the field.handleLoadStaticField in interface NodePluginb - the contextfield - the accessed fieldpublic boolean handleStoreField(GraphBuilderContext b, ValueNode object, ResolvedJavaField field, ValueNode value)
NodePluginhandleStoreField in interface NodePluginb - the contextobject - the receiver object for the field accessfield - the accessed fieldvalue - the value to be stored into the fieldpublic boolean handleStoreStaticField(GraphBuilderContext b, ResolvedJavaField field, ValueNode value)
NodePluginhandleStoreStaticField in interface NodePluginb - the contextfield - the accessed fieldvalue - the value to be stored into the fieldpublic boolean handleLoadIndexed(GraphBuilderContext b, ValueNode array, ValueNode index, GuardingNode boundsCheck, JavaKind elementKind)
NodePluginpush a value using the provided elementKind.handleLoadIndexed in interface NodePluginb - the contextarray - the accessed arrayindex - the index for the array accessboundsCheck - the explicit bounds check already emitted, or null if no bounds check was
emitted yetelementKind - the element kind of the accessed arraypublic boolean handleStoreIndexed(GraphBuilderContext b, ValueNode array, ValueNode index, GuardingNode boundsCheck, GuardingNode storeCheck, JavaKind elementKind, ValueNode value)
NodePluginhandleStoreIndexed in interface NodePluginb - the contextarray - the accessed arrayindex - the index for the array accessboundsCheck - the explicit array bounds check already emitted, or null if no array
bounds check was emitted yetstoreCheck - the explicit array store check already emitted, or null if no array store
check was emitted yetelementKind - the element kind of the accessed arrayvalue - the value to be stored into the arraypublic boolean handleCheckCast(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile)
NodePluginpush a value with the result of the cast using
JavaKind.Object.handleCheckCast in interface NodePluginb - the contextobject - the object to be type checkedtype - the type that the object is checked againstprofile - the profiling information for the type check, or null if no profiling
information is availablepublic boolean handleInstanceOf(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile)
NodePluginpush a value with the result of the instanceof using
JavaKind.Int.handleInstanceOf in interface NodePluginb - the contextobject - the object to be type checkedtype - the type that the object is checked againstprofile - the profiling information for the type check, or null if no profiling
information is available