Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 19410:61d3cb8e1280
Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 17:47:43 +0100 |
parents | 7e2c87dae93e |
children | 880717e44675 |
comparison
equal
deleted
inserted
replaced
19409:a16f1bbe2965 | 19410:61d3cb8e1280 |
---|---|
32 import com.oracle.graal.nodes.spi.*; | 32 import com.oracle.graal.nodes.spi.*; |
33 import com.oracle.graal.nodes.type.*; | 33 import com.oracle.graal.nodes.type.*; |
34 | 34 |
35 @NodeInfo | 35 @NodeInfo |
36 public class MethodCallTargetNode extends CallTargetNode implements IterableNodeType, Simplifiable { | 36 public class MethodCallTargetNode extends CallTargetNode implements IterableNodeType, Simplifiable { |
37 public static final NodeClass TYPE = NodeClass.get(MethodCallTargetNode.class); | 37 public static final NodeClass<MethodCallTargetNode> TYPE = NodeClass.get(MethodCallTargetNode.class); |
38 protected final JavaType returnType; | 38 protected final JavaType returnType; |
39 | 39 |
40 public MethodCallTargetNode(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { | 40 public MethodCallTargetNode(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { |
41 this(TYPE, invokeKind, targetMethod, arguments, returnType); | 41 this(TYPE, invokeKind, targetMethod, arguments, returnType); |
42 } | 42 } |
43 | 43 |
44 protected MethodCallTargetNode(NodeClass c, InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { | 44 protected MethodCallTargetNode(NodeClass<?> c, InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { |
45 super(c, arguments, targetMethod, invokeKind); | 45 super(c, arguments, targetMethod, invokeKind); |
46 this.returnType = returnType; | 46 this.returnType = returnType; |
47 } | 47 } |
48 | 48 |
49 /** | 49 /** |
246 } | 246 } |
247 return targetMethod().format("%h.%n"); | 247 return targetMethod().format("%h.%n"); |
248 } | 248 } |
249 | 249 |
250 public static MethodCallTargetNode find(StructuredGraph graph, ResolvedJavaMethod method) { | 250 public static MethodCallTargetNode find(StructuredGraph graph, ResolvedJavaMethod method) { |
251 for (MethodCallTargetNode target : graph.getNodes(MethodCallTargetNode.class)) { | 251 for (MethodCallTargetNode target : graph.getNodes(MethodCallTargetNode.TYPE)) { |
252 if (target.targetMethod().equals(method)) { | 252 if (target.targetMethod().equals(method)) { |
253 return target; | 253 return target; |
254 } | 254 } |
255 } | 255 } |
256 return null; | 256 return null; |