public final class TypeSwitchNode extends SwitchNode implements LIRLowerable, Simplifiable
TypeSwitchNode performs a lookup based on the type of the input value. The type
comparison is an exact type comparison, not an instanceof.Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberable| Modifier and Type | Field and Description |
|---|---|
protected Constant[] |
hubs |
protected ResolvedJavaType[] |
keys |
static NodeClass<TypeSwitchNode> |
TYPE |
keySuccessors, profileData, successors, valueEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
TypeSwitchNode(ValueNode value,
AbstractBeginNode[] successors,
ResolvedJavaType[] keys,
int[] keySuccessors,
ConstantReflectionProvider constantReflection,
ProfileData.SwitchProbabilityData profileData) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalKeys(SwitchNode switchNode)
Returns true if the switch has the same keys in the same order as this switch.
|
void |
generate(NodeLIRBuilderTool gen) |
Stamp |
getValueStampForSuccessor(AbstractBeginNode beginNode) |
boolean |
isSorted() |
Constant |
keyAt(int index)
The key at the specified position, encoded in a Constant.
|
int |
keyCount()
The number of distinct keys in this switch.
|
void |
simplify(SimplifierTool tool) |
ResolvedJavaType |
typeAt(int index) |
blockSuccessor, blockSuccessorCount, defaultProbability, defaultSuccessor, defaultSuccessorIndex, dynamicNodeSizeEstimate, estimatedNodeCycles, getKeyProbabilities, getKeySuccessors, getPrimarySuccessor, getProfileData, getSuccessorCount, keyProbability, keySuccessor, keySuccessorIndex, killOtherSuccessors, probability, setBlockSuccessor, setProbability, structureEquals, valuesuccessorProbabilitiesasFixedNode, verifyasConstant, 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, 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, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitasNodepublic static final NodeClass<TypeSwitchNode> TYPE
protected final ResolvedJavaType[] keys
protected final Constant[] hubs
public TypeSwitchNode(ValueNode value, AbstractBeginNode[] successors, ResolvedJavaType[] keys, int[] keySuccessors, ConstantReflectionProvider constantReflection, ProfileData.SwitchProbabilityData profileData)
public boolean isSorted()
isSorted in class SwitchNodepublic int keyCount()
SwitchNodekeyCount in class SwitchNodepublic Constant keyAt(int index)
SwitchNodekeyAt in class SwitchNodepublic boolean equalKeys(SwitchNode switchNode)
SwitchNodeequalKeys in class SwitchNodepublic ResolvedJavaType typeAt(int index)
public void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerablepublic void simplify(SimplifierTool tool)
simplify in interface Simplifiablepublic Stamp getValueStampForSuccessor(AbstractBeginNode beginNode)
getValueStampForSuccessor in class SwitchNode