changeset 14131:2c538e48bb1a

Fix bug in OSR compilation.
author Roland Schatz <roland.schatz@oracle.com>
date Tue, 11 Mar 2014 17:21:55 +0100
parents 3a30575968cd
children 5bf75c95ed56
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Tue Mar 11 14:45:35 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Tue Mar 11 17:21:55 2014 +0100
@@ -30,7 +30,6 @@
 import com.oracle.graal.loop.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
-import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.util.*;
 import com.oracle.graal.phases.*;
 import com.oracle.graal.phases.common.*;
@@ -94,13 +93,15 @@
 
         for (int i = 0; i < osrState.localsSize(); i++) {
             ValueNode value = osrState.localAt(i);
-            if (value != null) {
+            if (value instanceof ProxyNode) {
                 ProxyNode proxy = (ProxyNode) value;
                 /*
-                 * we need to drop the stamp and go back to the kind since the types we see during
-                 * OSR may be too precise (if a branch was not parsed for example).
+                 * we need to drop the stamp since the types we see during OSR may be too precise
+                 * (if a branch was not parsed for example).
                  */
-                proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, StampFactory.forKind(proxy.kind()))));
+                proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, proxy.stamp().unrestricted())));
+            } else {
+                assert value instanceof OSRLocalNode;
             }
         }