# HG changeset patch # User Gilles Duboscq # Date 1445348650 -7200 # Node ID 09d5bba0743e63f704c6bbb59b0f60421adbdb81 # Parent be773541ce54e7b0719e09a673bfc65d1243f7f3 BytecodeExceptionNodes can be lowere regarless of the guards stage diff -r be773541ce54 -r 09d5bba0743e graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java --- 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); } }