changeset 22871:09d5bba0743e

BytecodeExceptionNodes can be lowere regarless of the guards stage
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 20 Oct 2015 15:44:10 +0200
parents be773541ce54
children ad106dd2000c
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java
diffstat 1 files changed, 21 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java	Tue Oct 20 14:16:21 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java	Tue Oct 20 15:44:10 2015 +0200
@@ -531,32 +531,30 @@
 
     private void lowerBytecodeExceptionNode(BytecodeExceptionNode node) {
         StructuredGraph graph = node.graph();
-        if (graph.getGuardsStage().allowsFloatingGuards()) {
-            if (OmitHotExceptionStacktrace.getValue()) {
-                Throwable exception;
-                if (node.getExceptionClass() == NullPointerException.class) {
-                    exception = Exceptions.cachedNullPointerException;
-                } else if (node.getExceptionClass() == ArrayIndexOutOfBoundsException.class) {
-                    exception = Exceptions.cachedArrayIndexOutOfBoundsException;
-                } else {
-                    throw JVMCIError.shouldNotReachHere();
-                }
-                FloatingNode exceptionNode = ConstantNode.forConstant(constantReflection.forObject(exception), metaAccess, graph);
-                graph.replaceFixedWithFloating(node, exceptionNode);
+        if (OmitHotExceptionStacktrace.getValue()) {
+            Throwable exception;
+            if (node.getExceptionClass() == NullPointerException.class) {
+                exception = Exceptions.cachedNullPointerException;
+            } else if (node.getExceptionClass() == ArrayIndexOutOfBoundsException.class) {
+                exception = Exceptions.cachedArrayIndexOutOfBoundsException;
+            } else {
+                throw JVMCIError.shouldNotReachHere();
+            }
+            FloatingNode exceptionNode = ConstantNode.forConstant(constantReflection.forObject(exception), metaAccess, graph);
+            graph.replaceFixedWithFloating(node, exceptionNode);
 
+        } else {
+            ForeignCallDescriptor descriptor;
+            if (node.getExceptionClass() == NullPointerException.class) {
+                descriptor = RuntimeCalls.CREATE_NULL_POINTER_EXCEPTION;
+            } else if (node.getExceptionClass() == ArrayIndexOutOfBoundsException.class) {
+                descriptor = RuntimeCalls.CREATE_OUT_OF_BOUNDS_EXCEPTION;
             } else {
-                ForeignCallDescriptor descriptor;
-                if (node.getExceptionClass() == NullPointerException.class) {
-                    descriptor = RuntimeCalls.CREATE_NULL_POINTER_EXCEPTION;
-                } else if (node.getExceptionClass() == ArrayIndexOutOfBoundsException.class) {
-                    descriptor = RuntimeCalls.CREATE_OUT_OF_BOUNDS_EXCEPTION;
-                } else {
-                    throw JVMCIError.shouldNotReachHere();
-                }
+                throw JVMCIError.shouldNotReachHere();
+            }
 
-                ForeignCallNode foreignCallNode = graph.add(new ForeignCallNode(foreignCalls, descriptor, node.stamp(), node.getArguments()));
-                graph.replaceFixedWithFixed(node, foreignCallNode);
-            }
+            ForeignCallNode foreignCallNode = graph.add(new ForeignCallNode(foreignCalls, descriptor, node.stamp(), node.getArguments()));
+            graph.replaceFixedWithFixed(node, foreignCallNode);
         }
     }