public abstract class MacroNode extends FixedWithNextNode implements Lowerable
Class.isInterface()
.getLoweredSnippetGraph(LoweringTool)
returns a non-null result, this graph is
used as a replacement.MethodSubstitution
for the target method is found, this substitution is used as
a replacement.InvokeNode
. Note that this is only
possible if the macro node is a MacroStateSplitNode
.Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Modifier and Type | Field and Description |
---|---|
protected NodeInputList<ValueNode> |
arguments |
protected int |
bci |
protected CallTargetNode.InvokeKind |
invokeKind |
protected JavaType |
returnType |
protected ResolvedJavaMethod |
targetMethod |
static NodeClass<MacroNode> |
TYPE |
next
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Modifier | Constructor and Description |
---|---|
protected |
MacroNode(NodeClass<? extends MacroNode> c,
CallTargetNode.InvokeKind invokeKind,
ResolvedJavaMethod targetMethod,
int bci,
JavaType returnType,
ValueNode... arguments) |
Modifier and Type | Method and Description |
---|---|
protected InvokeNode |
createInvoke() |
int |
getBci() |
protected StructuredGraph |
getLoweredSnippetGraph(LoweringTool tool)
Gets a snippet to be used for lowering this macro node.
|
protected StructuredGraph |
getLoweredSubstitutionGraph(LoweringTool tool)
Gets a normal method substitution to be used for lowering this macro node.
|
JavaType |
getReturnType() |
ResolvedJavaMethod |
getTargetMethod() |
void |
lower(LoweringTool tool)
Expand this node into lower level nodes expressing the same semantics.
|
protected StructuredGraph |
lowerReplacement(StructuredGraph replacementGraph,
LoweringTool tool)
Applies lowering to a replacement graph.
|
protected InvokeNode |
replaceWithInvoke() |
private static Stamp |
returnStamp(JavaType returnType) |
protected FrameState |
stateAfter() |
asNode, next, setNext
asConstant, asJavaConstant, 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, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputs
protected NodeInputList<ValueNode> arguments
protected final int bci
protected final ResolvedJavaMethod targetMethod
protected final JavaType returnType
protected final CallTargetNode.InvokeKind invokeKind
protected MacroNode(NodeClass<? extends MacroNode> c, CallTargetNode.InvokeKind invokeKind, ResolvedJavaMethod targetMethod, int bci, JavaType returnType, ValueNode... arguments)
private static Stamp returnStamp(JavaType returnType)
public int getBci()
public ResolvedJavaMethod getTargetMethod()
public JavaType getReturnType()
protected FrameState stateAfter()
protected StructuredGraph getLoweredSnippetGraph(LoweringTool tool)
protected StructuredGraph getLoweredSubstitutionGraph(LoweringTool tool)
getLoweredSnippetGraph(LoweringTool)
returns null. The returned graph (if
non-null) must have been lowered.protected StructuredGraph lowerReplacement(StructuredGraph replacementGraph, LoweringTool tool)
replacementGraph
- a replacement (i.e., snippet or method substitution) graphpublic void lower(LoweringTool tool)
Lowerable
protected InvokeNode replaceWithInvoke()
protected InvokeNode createInvoke()