public class InstanceOfNode extends UnaryOpLogicNode implements Lowerable
InstanceOfNode represents an instanceof test.
A Java instanceof test normally returns false when the tested object is null.
However, if the node allows null, the test should return true
for null values.
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>| Modifier and Type | Field and Description |
|---|---|
protected AnchoringNode |
anchor |
static NodeClass<InstanceOfNode> |
TYPE |
valueEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
InstanceOfNode(NodeClass<? extends InstanceOfNode> c,
ObjectStamp checkedStamp,
ValueNode object,
JavaTypeProfile profile,
AnchoringNode anchor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsNull() |
ValueNode |
canonical(CanonicalizerTool tool,
ValueNode forValue)
Similar to
Canonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer. |
static LogicNode |
create(TypeReference type,
ValueNode object) |
static LogicNode |
create(TypeReference type,
ValueNode object,
JavaTypeProfile profile,
AnchoringNode anchor) |
static LogicNode |
createAllowNull(TypeReference type,
ValueNode object,
JavaTypeProfile profile,
AnchoringNode anchor) |
static LogicNode |
createHelper(ObjectStamp checkedStamp,
ValueNode object,
JavaTypeProfile profile,
AnchoringNode anchor) |
static boolean |
doInstanceof(ResolvedJavaType type,
Object object) |
static LogicNode |
findSynonym(ObjectStamp checkedStamp,
ValueNode object,
NodeView view) |
AnchoringNode |
getAnchor() |
ObjectStamp |
getCheckedStamp() |
Stamp |
getSucceedingStampForValue(boolean negated)
The input stamp cannot be trusted, the returned stamp cannot use the input stamp to narrow
itself or derive any assumptions.
|
TriState |
implies(boolean thisNegated,
LogicNode other)
Determines what this condition implies about the other.
|
static boolean |
intrinsify(GraphBuilderContext b,
ResolvedJavaType type,
ValueNode object) |
JavaTypeProfile |
profile() |
void |
setProfile(JavaTypeProfile typeProfile,
AnchoringNode anchor) |
TriState |
tryFold(Stamp valueStamp) |
TypeReference |
type()
Gets the type being tested.
|
generate, getSucceedingStampForValue, getValue, virtualizeand, and, isContradiction, isTautology, or, orasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, hasUsagesOfType, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitasNodecanonicalpublic static final NodeClass<InstanceOfNode> TYPE
protected AnchoringNode anchor
protected InstanceOfNode(NodeClass<? extends InstanceOfNode> c, ObjectStamp checkedStamp, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor)
public static LogicNode createAllowNull(TypeReference type, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor)
public static LogicNode create(TypeReference type, ValueNode object)
public static LogicNode create(TypeReference type, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor)
public static LogicNode createHelper(ObjectStamp checkedStamp, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor)
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue)
Canonicalizable.UnaryCanonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer.canonical in interface Canonicalizable.Unary<ValueNode>public static LogicNode findSynonym(ObjectStamp checkedStamp, ValueNode object, NodeView view)
public TypeReference type()
public JavaTypeProfile profile()
public Stamp getSucceedingStampForValue(boolean negated)
UnaryOpLogicNodeUnaryOpLogicNode.getSucceedingStampForValue(boolean, Stamp) instead.getSucceedingStampForValue in class UnaryOpLogicNodepublic TriState tryFold(Stamp valueStamp)
tryFold in class UnaryOpLogicNodepublic boolean allowsNull()
public void setProfile(JavaTypeProfile typeProfile,
AnchoringNode anchor)
public AnchoringNode getAnchor()
public ObjectStamp getCheckedStamp()
public static boolean doInstanceof(ResolvedJavaType type,
Object object)
public static boolean intrinsify(GraphBuilderContext b, ResolvedJavaType type, ValueNode object)
public TriState implies(boolean thisNegated,
LogicNode other)
LogicNodeTriState.TRUETriState.FALSEimplies in class UnaryOpLogicNodethisNegated - whether this condition should be considered as false.other - the other condition.