public abstract class CallTargetNode extends ValueNode implements LIRLowerable
| Modifier and Type | Class and Description |
|---|---|
static class |
CallTargetNode.InvokeKind |
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 NodeInputList<ValueNode> |
arguments |
protected CallTargetNode.InvokeKind |
invokeKind |
protected ResolvedJavaType |
referencedType
Receiver type referenced at the interface call site.
|
protected StampPair |
returnStamp |
protected ResolvedJavaMethod |
targetMethod |
static NodeClass<CallTargetNode> |
TYPE |
EMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
CallTargetNode(NodeClass<? extends CallTargetNode> c,
ValueNode[] arguments,
ResolvedJavaMethod targetMethod,
CallTargetNode.InvokeKind invokeKind,
StampPair returnStamp) |
| Modifier and Type | Method and Description |
|---|---|
NodeInputList<ValueNode> |
arguments() |
static Stamp |
createReturnStamp(Assumptions assumptions,
JavaType returnType) |
void |
generate(NodeLIRBuilderTool gen) |
Invoke |
invoke() |
CallTargetNode.InvokeKind |
invokeKind() |
ResolvedJavaType |
referencedType() |
StampPair |
returnStamp() |
void |
setInvokeKind(CallTargetNode.InvokeKind kind) |
void |
setReferencedType(ResolvedJavaType referencedType) |
void |
setTargetMethod(ResolvedJavaMethod targetMethod) |
ResolvedJavaMethod |
targetMethod()
Gets the target method for this invocation instruction.
|
abstract String |
targetName()
A human-readable representation of the target, used for debug printing only.
|
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, withNodeSourcePositionpublic static final NodeClass<CallTargetNode> TYPE
protected NodeInputList<ValueNode> arguments
protected ResolvedJavaMethod targetMethod
protected ResolvedJavaType referencedType
interface I1 {
void foo();
}
interface I2 extends I1 {
}
void bar(I2 o) {
o.foo();
}
Here at the call site the declaring type for foo() is I1, while the
referenced type is I2. Only receivers of type T that is T <: I2
should be allowed at the call site. If they are not - an exception should be thrown.
Since the interface types are not verified, another way to think about this call site is to
rewrite it as follows:
void bar(Object o) {
((I2) o).foo();
}
So, in case the receiver is not a subtype of I2 an exception is thrown.protected CallTargetNode.InvokeKind invokeKind
protected final StampPair returnStamp
protected CallTargetNode(NodeClass<? extends CallTargetNode> c, ValueNode[] arguments, ResolvedJavaMethod targetMethod, CallTargetNode.InvokeKind invokeKind, StampPair returnStamp)
public NodeInputList<ValueNode> arguments()
public static Stamp createReturnStamp(Assumptions assumptions, JavaType returnType)
public StampPair returnStamp()
public abstract String targetName()
public void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerablepublic void setTargetMethod(ResolvedJavaMethod targetMethod)
public ResolvedJavaMethod targetMethod()
public void setReferencedType(ResolvedJavaType referencedType)
public ResolvedJavaType referencedType()
public CallTargetNode.InvokeKind invokeKind()
public void setInvokeKind(CallTargetNode.InvokeKind kind)
public Invoke invoke()