# HG changeset patch # User Roland Schatz # Date 1394554915 -3600 # Node ID 2c538e48bb1afb73bee79e99d03e07f6c1df91bf # Parent 3a30575968cdf8efeeaf10fa2f311cdb9b5383be Fix bug in OSR compilation. diff -r 3a30575968cd -r 2c538e48bb1a 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 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; } }