Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 6539:2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 09 Oct 2012 15:23:38 -0700 |
parents | 823a2978e7ba |
children | b914b9b4c578 |
comparison
equal
deleted
inserted
replaced
6538:d1ba5ba4f484 | 6539:2463eb24b644 |
---|---|
86 public boolean isStatic() { | 86 public boolean isStatic() { |
87 return invokeKind() == InvokeKind.Static; | 87 return invokeKind() == InvokeKind.Static; |
88 } | 88 } |
89 | 89 |
90 public Kind returnKind() { | 90 public Kind returnKind() { |
91 return targetMethod().signature().returnKind(); | 91 return targetMethod().getSignature().getReturnKind(); |
92 } | 92 } |
93 | 93 |
94 public Invoke invoke() { | 94 public Invoke invoke() { |
95 return (Invoke) this.usages().first(); | 95 return (Invoke) this.usages().first(); |
96 } | 96 } |
118 public ValueNode canonical(CanonicalizerTool tool) { | 118 public ValueNode canonical(CanonicalizerTool tool) { |
119 if (!isStatic()) { | 119 if (!isStatic()) { |
120 ValueNode receiver = receiver(); | 120 ValueNode receiver = receiver(); |
121 if (receiver != null && receiver.objectStamp().isExactType()) { | 121 if (receiver != null && receiver.objectStamp().isExactType()) { |
122 if (invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual) { | 122 if (invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual) { |
123 ResolvedJavaMethod method = receiver.objectStamp().type().resolveMethodImpl(targetMethod); | 123 ResolvedJavaMethod method = receiver.objectStamp().type().resolveMethod(targetMethod); |
124 if (method != null) { | 124 if (method != null) { |
125 invokeKind = InvokeKind.Special; | 125 invokeKind = InvokeKind.Special; |
126 targetMethod = method; | 126 targetMethod = method; |
127 } | 127 } |
128 } | 128 } |
131 return this; | 131 return this; |
132 } | 132 } |
133 | 133 |
134 @Override | 134 @Override |
135 public Stamp returnStamp() { | 135 public Stamp returnStamp() { |
136 Kind returnKind = targetMethod.signature().returnKind(); | 136 Kind returnKind = targetMethod.getSignature().getReturnKind(); |
137 if (returnKind == Kind.Object && returnType instanceof ResolvedJavaType) { | 137 if (returnKind == Kind.Object && returnType instanceof ResolvedJavaType) { |
138 return StampFactory.declared((ResolvedJavaType) returnType); | 138 return StampFactory.declared((ResolvedJavaType) returnType); |
139 } else { | 139 } else { |
140 return StampFactory.forKind(returnKind); | 140 return StampFactory.forKind(returnKind); |
141 } | 141 } |
144 @Override | 144 @Override |
145 public String targetName() { | 145 public String targetName() { |
146 if (targetMethod() == null) { | 146 if (targetMethod() == null) { |
147 return "??Invalid!"; | 147 return "??Invalid!"; |
148 } | 148 } |
149 return targetMethod().name(); | 149 return targetMethod().getName(); |
150 } | 150 } |
151 } | 151 } |