Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 18845:f57d86eb036f
removed Node factory methods
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Jan 2015 20:39:04 +0100 |
parents | 5a21cac1968f |
children | 14496953435e |
comparison
equal
deleted
inserted
replaced
18843:f2261069ba99 | 18845:f57d86eb036f |
---|---|
33 | 33 |
34 @NodeInfo | 34 @NodeInfo |
35 public class MethodCallTargetNode extends CallTargetNode implements IterableNodeType, Simplifiable { | 35 public class MethodCallTargetNode extends CallTargetNode implements IterableNodeType, Simplifiable { |
36 protected final JavaType returnType; | 36 protected final JavaType returnType; |
37 | 37 |
38 /** | 38 public MethodCallTargetNode(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { |
39 * @param arguments | |
40 */ | |
41 public static MethodCallTargetNode create(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { | |
42 return new MethodCallTargetNode(invokeKind, targetMethod, arguments, returnType); | |
43 } | |
44 | |
45 protected MethodCallTargetNode(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] arguments, JavaType returnType) { | |
46 super(arguments, targetMethod, invokeKind); | 39 super(arguments, targetMethod, invokeKind); |
47 this.returnType = returnType; | 40 this.returnType = returnType; |
48 } | 41 } |
49 | 42 |
50 /** | 43 /** |
188 * dynamic check. 2) we need to ensure that there is still only one implementor of | 181 * dynamic check. 2) we need to ensure that there is still only one implementor of |
189 * this interface, i.e. that we are calling the right method. We could do this with | 182 * this interface, i.e. that we are calling the right method. We could do this with |
190 * an assumption but as we need an instanceof check anyway we can verify both | 183 * an assumption but as we need an instanceof check anyway we can verify both |
191 * properties by checking of the receiver is an instance of the single implementor. | 184 * properties by checking of the receiver is an instance of the single implementor. |
192 */ | 185 */ |
193 LogicNode condition = graph().unique(InstanceOfNode.create(singleImplementor, receiver, getProfile())); | 186 LogicNode condition = graph().unique(new InstanceOfNode(singleImplementor, receiver, getProfile())); |
194 GuardNode guard = graph().unique( | 187 GuardNode guard = graph().unique( |
195 GuardNode.create(condition, BeginNode.prevBegin(invoke().asNode()), DeoptimizationReason.OptimizedTypeCheckViolated, DeoptimizationAction.InvalidateRecompile, false, | 188 new GuardNode(condition, BeginNode.prevBegin(invoke().asNode()), DeoptimizationReason.OptimizedTypeCheckViolated, DeoptimizationAction.InvalidateRecompile, false, |
196 JavaConstant.NULL_POINTER)); | 189 JavaConstant.NULL_POINTER)); |
197 PiNode piNode = graph().unique(PiNode.create(receiver, StampFactory.declaredNonNull(singleImplementor), guard)); | 190 PiNode piNode = graph().unique(new PiNode(receiver, StampFactory.declaredNonNull(singleImplementor), guard)); |
198 arguments().set(0, piNode); | 191 arguments().set(0, piNode); |
199 setInvokeKind(InvokeKind.Virtual); | 192 setInvokeKind(InvokeKind.Virtual); |
200 setTargetMethod(singleImplementorMethod); | 193 setTargetMethod(singleImplementorMethod); |
201 } | 194 } |
202 } | 195 } |