public final class ClassGetHubNode extends FloatingNode implements Lowerable, Canonicalizable, ConvertNode
Class::_klass to get the hub for a Class. This node mostly exists
to replace _klass._java_mirror._klass with _klass. The constant folding could be
handled by
ReadNode.canonicalizeRead(ValueNode, AddressNode, LocationIdentity, CanonicalizerTool).
Note that there is no Klass for primitive types in the Java HotSpot VM. If the input
Class is a primitive type, the returned value is null.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 ValueNode |
clazz |
static NodeClass<ClassGetHubNode> |
TYPE |
EMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
ClassGetHubNode(ValueNode clazz) |
| Modifier and Type | Method and Description |
|---|---|
Node |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
static ValueNode |
canonical(ClassGetHubNode classGetHubNode,
MetaAccessProvider metaAccess,
ConstantReflectionProvider constantReflection,
boolean allUsagesAvailable,
Stamp stamp,
ValueNode clazz) |
Constant |
convert(Constant c,
ConstantReflectionProvider constantReflection) |
static ValueNode |
create(ValueNode clazz,
MetaAccessProvider metaAccess,
ConstantReflectionProvider constantReflection) |
ValueNode |
getValue() |
static boolean |
intrinsify(GraphBuilderContext b,
ValueNode clazz) |
boolean |
isLossless()
Check whether a conversion is lossless.
|
boolean |
mayNullCheckSkipConversion()
There is more than one
Class value that has a NULL hub. |
static KlassPointer |
piCastNonNull(KlassPointer object,
GuardingNode anchor) |
boolean |
preservesOrder(CanonicalCondition op,
Constant value,
ConstantReflectionProvider constantReflection)
Check whether a conversion preserves comparison order against a particular constant value.
|
static KlassPointer |
readClass(Class<?> clazzNonNull) |
Constant |
reverse(Constant c,
ConstantReflectionProvider constantReflection) |
asConstant, 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, waitpreservesOrderasNodepublic static final NodeClass<ClassGetHubNode> TYPE
protected ValueNode clazz
public ClassGetHubNode(ValueNode clazz)
public static ValueNode create(ValueNode clazz, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection)
public static boolean intrinsify(GraphBuilderContext b, ValueNode clazz)
public static ValueNode canonical(ClassGetHubNode classGetHubNode, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, boolean allUsagesAvailable, Stamp stamp, ValueNode clazz)
public Node canonical(CanonicalizerTool tool)
Canonicalizablenull will delete the current node and replace it with null at
all usages. Note that it is not necessary to delete floating nodes that have no more usages
this way - they will be deleted automatically.canonical in interface Canonicalizabletool - provides access to runtime interfaces like MetaAccessProviderpublic static KlassPointer readClass(Class<?> clazzNonNull)
public static KlassPointer piCastNonNull(KlassPointer object, GuardingNode anchor)
public ValueNode getValue()
getValue in interface ConvertNodepublic Constant convert(Constant c,
ConstantReflectionProvider constantReflection)
convert in interface ConvertNodepublic Constant reverse(Constant c,
ConstantReflectionProvider constantReflection)
reverse in interface ConvertNodepublic boolean isLossless()
ConvertNodeisLossless in interface ConvertNodepublic boolean mayNullCheckSkipConversion()
Class value that has a NULL hub.mayNullCheckSkipConversion in interface ConvertNodepublic boolean preservesOrder(CanonicalCondition op, Constant value, ConstantReflectionProvider constantReflection)
ConvertNodepreservesOrder in interface ConvertNodeop - a comparison operator