changeset 4593:1827e00c87b9

Canonicalize invoke kind to static when the exact receiver type is known, regardless of whether it is constant.
author Andreas Woess <andreas.woess@jku.at>
date Tue, 14 Feb 2012 20:19:29 +0100
parents f62db40b3b2e
children 82fc1c96f705
files graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/MethodCallTargetNode.java
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/MethodCallTargetNode.java	Tue Feb 14 10:21:38 2012 -0800
+++ b/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/MethodCallTargetNode.java	Tue Feb 14 20:19:29 2012 +0100
@@ -133,11 +133,7 @@
         if (!isStatic()) {
             ValueNode receiver = receiver();
             if (receiver != null && receiver.exactType() != null) {
-                if (invokeKind == InvokeKind.Interface) {
-                    invokeKind = InvokeKind.Virtual;
-                    targetMethod = receiver.exactType().resolveMethodImpl(targetMethod);
-                }
-                if (receiver.isConstant() && invokeKind == InvokeKind.Virtual) {
+                if (invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual) {
                     invokeKind = InvokeKind.Special;
                     targetMethod = receiver.exactType().resolveMethodImpl(targetMethod);
                 }