# HG changeset patch # User Doug Simon # Date 1353275143 -3600 # Node ID dd0dd0321e2a5b6e5e01db6932ff89243e7883c4 # Parent e9f69041ac38ed3793495fa82511f8746bd8948a throw BailoutException instead of GraalInternalError when encountering request for OSR compilation at a point where the expression stack is not empty diff -r e9f69041ac38 -r dd0dd0321e2a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Nov 18 21:30:35 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Nov 18 22:45:43 2012 +0100 @@ -115,7 +115,7 @@ try { final boolean printCompilation = GraalOptions.PrintCompilation && !TTY.isSuppressed(); if (printCompilation) { - TTY.println(String.format("%-6d Graal %-70s %-45s %-50s %s...", id, method.getDeclaringClass().getName(), method.getName(), method.getSignature(), entryBCI == StructuredGraph.INVOCATION_ENTRY_BCI ? "" : "(OSR) ")); + TTY.println(String.format("%-6d Graal %-70s %-45s %-50s %s...", id, method.getDeclaringClass().getName(), method.getName(), method.getSignature(), entryBCI == StructuredGraph.INVOCATION_ENTRY_BCI ? "" : "(OSR@" + entryBCI + ") ")); } CompilationResult result = null; diff -r e9f69041ac38 -r dd0dd0321e2a 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 Sun Nov 18 21:30:35 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java Sun Nov 18 22:45:43 2012 +0100 @@ -27,6 +27,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.Node.*; import com.oracle.graal.graph.iterators.*; import com.oracle.graal.loop.*; import com.oracle.graal.nodes.*; @@ -61,7 +62,7 @@ throw new BailoutException("osr with locks not supported"); } if (osr.stateAfter().stackSize() != 0) { - throw new GraalInternalError("osr with stack entries not supported"); + throw new BailoutException("osr with stack entries not supported: " + osr.stateAfter().toString(Verbosity.Debugger)); } LoopEx osrLoop = null; LoopsData loops = new LoopsData(graph);