changeset 21994:b0fbc832cf3c

Use given receiver if originalValue of receiver cannot be determined CallSiteTargetNode
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Wed, 17 Jun 2015 14:24:55 +0200
parents e5ab0d49f4d0
children 922a0438914b
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java	Wed Jun 17 14:51:27 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java	Wed Jun 17 14:24:55 2015 +0200
@@ -146,6 +146,10 @@
         InvocationPlugin plugin = new InvocationPlugin() {
             public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
                 ValueNode callSite = GraphUtil.originalValue(receiver.get());
+                if (receiver.get() != null && callSite == null) {
+                    // Original receiver could not be determined, we use the given receiver
+                    callSite = receiver.get();
+                }
                 ValueNode folded = CallSiteTargetNode.tryFold(callSite, b.getMetaAccess(), b.getAssumptions());
                 if (folded != null) {
                     b.addPush(Kind.Object, folded);