Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 11391:f34b01673b6a
Fix NPE in MethodCallTargetNode.canonicalize
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 21 Aug 2013 19:33:06 +0200 |
parents | ef6915cf1e59 |
children | 1aed684853f6 |
comparison
equal
deleted
inserted
replaced
11390:a313367eb5c2 | 11391:f34b01673b6a |
---|---|
126 | 126 |
127 @Override | 127 @Override |
128 public ValueNode canonical(CanonicalizerTool tool) { | 128 public ValueNode canonical(CanonicalizerTool tool) { |
129 if (!isStatic()) { | 129 if (!isStatic()) { |
130 ValueNode receiver = receiver(); | 130 ValueNode receiver = receiver(); |
131 if (receiver != null && ObjectStamp.isExactType(receiver)) { | 131 if (receiver != null && ObjectStamp.isExactType(receiver) && ObjectStamp.typeOrNull(receiver) != null) { |
132 if (invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual) { | 132 if (invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual) { |
133 ResolvedJavaMethod method = ObjectStamp.typeOrNull(receiver).resolveMethod(targetMethod); | 133 ResolvedJavaMethod method = ObjectStamp.typeOrNull(receiver).resolveMethod(targetMethod); |
134 if (method != null) { | 134 if (method != null) { |
135 invokeKind = InvokeKind.Special; | 135 invokeKind = InvokeKind.Special; |
136 targetMethod = method; | 136 targetMethod = method; |