# HG changeset patch # User Gilles Duboscq # Date 1367587148 -7200 # Node ID 298e471937814ca28b77d7eb4a8a395eb6b8a804 # Parent 8f854c4deabf5c0aa138af57d78cd9bc6f28c64f Fix for delayed OSR: we must drop the precise stamps we have on the OSR locals since they may be too precise because of branch pruining in the graph builder. diff -r 8f854c4deabf -r 298e47193781 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java Fri May 03 12:14:37 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java Fri May 03 15:19:08 2013 +0200 @@ -30,6 +30,7 @@ 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.*; @@ -98,7 +99,11 @@ ValueNode value = osrState.localAt(i); if (value != null) { ProxyNode proxy = (ProxyNode) value; - proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, value.stamp()))); + /* + * 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). + */ + proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, StampFactory.forKind(proxy.kind())))); } }