public final class HotSpotNodePlugin extends Object implements NodePlugin, ParameterPlugin
Word
-type rewriting for intrinsic
functions
(snippets and method substitutions), by forwarding to the WordOperationPlugin
. Note that
we forward the NodePlugin
and ParameterPlugin
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.
Handling of Fold
and Node.NodeIntrinsic
annotated methods, by forwarding to the
NodeIntrinsificationPlugin
when parsing intrinsic functions.
Constant folding of field loads.
Modifier and Type | Field and Description |
---|---|
protected NodeIntrinsificationPlugin |
nodeIntrinsificationPlugin |
protected WordOperationPlugin |
wordOperationPlugin |
Constructor and Description |
---|
HotSpotNodePlugin(WordOperationPlugin wordOperationPlugin,
NodeIntrinsificationPlugin nodeIntrinsificationPlugin) |
protected final WordOperationPlugin wordOperationPlugin
protected final NodeIntrinsificationPlugin nodeIntrinsificationPlugin
public HotSpotNodePlugin(WordOperationPlugin wordOperationPlugin, NodeIntrinsificationPlugin nodeIntrinsificationPlugin)
public boolean canChangeStackKind(GraphBuilderContext b)
canChangeStackKind
in interface NodePlugin
public FloatingNode interceptParameter(GraphBuilderContext b, int index, Stamp stamp)
interceptParameter
in interface ParameterPlugin
public boolean handleInvoke(GraphBuilderContext b, ResolvedJavaMethod method, ValueNode[] args)
handleInvoke
in interface NodePlugin
public boolean handleLoadField(GraphBuilderContext b, ValueNode object, ResolvedJavaField field)
handleLoadField
in interface NodePlugin
public boolean handleLoadStaticField(GraphBuilderContext b, ResolvedJavaField field)
handleLoadStaticField
in interface NodePlugin
private static boolean tryReadField(GraphBuilderContext b, ResolvedJavaField field, JavaConstant object)
private static boolean tryConstantFold(GraphBuilderContext b, ResolvedJavaField field, JavaConstant object)
public boolean handleStoreField(GraphBuilderContext b, ValueNode object, ResolvedJavaField field, ValueNode value)
handleStoreField
in interface NodePlugin
public boolean handleStoreStaticField(GraphBuilderContext b, ResolvedJavaField field, ValueNode value)
handleStoreStaticField
in interface NodePlugin
public boolean handleLoadIndexed(GraphBuilderContext b, ValueNode array, ValueNode index, Kind elementKind)
handleLoadIndexed
in interface NodePlugin
public boolean handleStoreIndexed(GraphBuilderContext b, ValueNode array, ValueNode index, Kind elementKind, ValueNode value)
handleStoreIndexed
in interface NodePlugin
public boolean handleCheckCast(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile)
handleCheckCast
in interface NodePlugin
public boolean handleInstanceOf(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile)
handleInstanceOf
in interface NodePlugin