diff graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java @ 2672:35453d725a2a

Add a BailoutOnException option on C1X to be able to tell expected exceptions (bailouts on jsr etc.) appart from true/unexpected exceptions
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Thu, 12 May 2011 17:57:58 +0200
parents c93adece95d2
children bcd20d26d52d
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Thu May 12 17:17:50 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Thu May 12 17:57:58 2011 +0200
@@ -218,7 +218,11 @@
         } catch (CiBailout b) {
             return new CiResult(null, b, stats);
         } catch (Throwable t) {
-            return new CiResult(null, new CiBailout("Exception while compiling: " + method, t), stats);
+            if (C1XOptions.BailoutOnException) {
+                return new CiResult(null, new CiBailout("Exception while compiling: " + method, t), stats);
+            } else {
+                throw new RuntimeException(t);
+            }
         } finally {
             if (compiler.isObserved()) {
                 compiler.fireCompilationFinished(new CompilationEvent(this));