public final class ResolvedMethodHandleCallTargetNode extends MethodCallTargetNode implements Lowerable
MethodHandle
invocation target. Prior to
https://bugs.openjdk.java.net/browse/JDK-8072008, this is required for when a
MethodHandle
call is resolved to a constant target but the target was not inlined. In
that case, the original invocation must be restored with all of its original arguments. Why?
HotSpot linkage for MethodHandle
intrinsics (see
MethodHandles::generate_method_handle_dispatch
) expects certain implicit arguments to be
on the stack such as the MemberName suffix argument for a call to one of the MethodHandle.linkTo*
methods. An resolved MethodHandle
invocation drops these arguments which means the interpreter won't find them.CallTargetNode.InvokeKind
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Modifier and Type | Field and Description |
---|---|
(package private) NodeInputList<ValueNode> |
originalArguments |
protected JavaType |
originalReturnType |
protected ResolvedJavaMethod |
originalTargetMethod |
static NodeClass<ResolvedMethodHandleCallTargetNode> |
TYPE |
profile, returnType
arguments, invokeKind, targetMethod
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Modifier | Constructor and Description |
---|---|
protected |
ResolvedMethodHandleCallTargetNode(CallTargetNode.InvokeKind invokeKind,
ResolvedJavaMethod targetMethod,
ValueNode[] arguments,
JavaType returnType,
ResolvedJavaMethod originalTargetMethod,
ValueNode[] originalArguments,
JavaType originalReturnType) |
Modifier and Type | Method and Description |
---|---|
static MethodCallTargetNode |
create(CallTargetNode.InvokeKind invokeKind,
ResolvedJavaMethod targetMethod,
ValueNode[] arguments,
JavaType returnType,
ResolvedJavaMethod originalTargetMethod,
ValueNode[] originalArguments,
JavaType originalReturnType)
Creates a call target for an invocation on a direct target derived by resolving a constant
MethodHandle . |
void |
generate(NodeLIRBuilderTool gen) |
void |
lower(LoweringTool tool)
Expand this node into lower level nodes expressing the same semantics.
|
find, findSpecialCallTarget, getProfile, invoke, isStatic, receiver, returnKind, returnStamp, returnType, simplify, targetName, toString, verify
arguments, invokeKind, setInvokeKind, setTargetMethod, targetMethod
asConstant, asJavaConstant, asNode, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStamp
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, successors, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputs
public static final NodeClass<ResolvedMethodHandleCallTargetNode> TYPE
protected final ResolvedJavaMethod originalTargetMethod
protected final JavaType originalReturnType
NodeInputList<ValueNode> originalArguments
protected ResolvedMethodHandleCallTargetNode(CallTargetNode.InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType, ResolvedJavaMethod originalTargetMethod, ValueNode[] originalArguments, JavaType originalReturnType)
public static MethodCallTargetNode create(CallTargetNode.InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType, ResolvedJavaMethod originalTargetMethod, ValueNode[] originalArguments, JavaType originalReturnType)
MethodHandle
.public void lower(LoweringTool tool)
Lowerable
public void generate(NodeLIRBuilderTool gen)
generate
in interface LIRLowerable
generate
in class CallTargetNode