changeset 8462:149dee7367e0

Bailout from OSR compilation when there is more than on EntryMarkerNode
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 25 Mar 2013 15:59:26 +0100
parents 6a8ad083746e
children b2161263e9f2 6ed17512f672
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Mon Mar 25 14:11:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Mon Mar 25 15:59:26 2013 +0100
@@ -79,16 +79,17 @@
             NodeIterable<EntryMarkerNode> osrNodes = graph.getNodes(EntryMarkerNode.class);
             osr = osrNodes.first();
             if (osr == null) {
-                throw new BailoutException("no OnStackReplacementNode generated");
+                throw new BailoutException("No OnStackReplacementNode generated");
             }
             if (osrNodes.count() > 1) {
-                throw new GraalInternalError("multiple OnStackReplacementNodes generated");
+                // this can happen with JSR inlining
+                throw new BailoutException("Multiple OnStackReplacementNodes generated");
             }
             if (osr.stateAfter().locksSize() != 0) {
-                throw new BailoutException("osr with locks not supported");
+                throw new BailoutException("OSR with locks not supported");
             }
             if (osr.stateAfter().stackSize() != 0) {
-                throw new BailoutException("osr with stack entries not supported: " + osr.stateAfter().toString(Verbosity.Debugger));
+                throw new BailoutException("OSR with stack entries not supported: " + osr.stateAfter().toString(Verbosity.Debugger));
             }
             LoopEx osrLoop = null;
             LoopsData loops = new LoopsData(graph);