public abstract class ValueNode extends Node implements KindProvider
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Modifier and Type | Field and Description |
---|---|
private static NodePredicate |
IS_CONSTANT |
protected Stamp |
stamp
The kind of this value.
|
static NodeClass<ValueNode> |
TYPE |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
ValueNode(NodeClass<? extends ValueNode> c,
Stamp stamp) |
Modifier and Type | Method and Description |
---|---|
Constant |
asConstant()
Convert this value to a constant if it is a constant, otherwise return null.
|
JavaConstant |
asJavaConstant() |
ValueNode |
asNode() |
Kind |
getKind() |
StructuredGraph |
graph()
Gets the graph context of this node.
|
boolean |
inferStamp()
This method can be overridden by subclasses of
ValueNode if they need to recompute
their stamp if their inputs change. |
boolean |
isAllowedUsageType(InputType type) |
boolean |
isConstant()
Checks whether this value is a constant (i.e.
|
static NodePredicate |
isConstantPredicate() |
boolean |
isNullConstant()
Checks whether this value represents the null constant.
|
void |
setStamp(Stamp stamp) |
Stamp |
stamp() |
protected boolean |
updateStamp(Stamp newStamp)
Checks if the given stamp is different than the current one (
newStamp.equals(oldStamp) == false ). |
acceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verify, verifyEdges, verifyInputs
protected Stamp stamp
Kind.Void
for instructions that produce no value.
This kind is guaranteed to be a stack kind.private static final NodePredicate IS_CONSTANT
public final StructuredGraph graph()
Node
protected final boolean updateStamp(Stamp newStamp)
newStamp.equals(oldStamp) == false
). If it is different then the new stamp will
become the current stamp for this node.public boolean inferStamp()
ValueNode
if they need to recompute
their stamp if their inputs change. A typical implementation will compute the stamp and pass
it to updateStamp(Stamp)
, whose return value can be used as the result of this
method.public final Kind getKind()
getKind
in interface KindProvider
public final boolean isConstant()
ConstantNode
.true
if this value is a constantpublic static NodePredicate isConstantPredicate()
public final boolean isNullConstant()
true
if this value represents the null constantpublic final Constant asConstant()
JavaConstant
represented by this value if it is a constant; null
otherwisepublic final JavaConstant asJavaConstant()
public boolean isAllowedUsageType(InputType type)
isAllowedUsageType
in class Node