# HG changeset patch # User Christian Haeubl # Date 1328761847 28800 # Node ID fc78ad20ec384e32d5d0469795e0d535affd3759 # Parent e6e14d25e60854dfdb61bb5608f8d0313cb45827 fixed exception framestate diff -r e6e14d25e608 -r fc78ad20ec38 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java Tue Feb 07 18:37:49 2012 -0800 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java Wed Feb 08 20:30:47 2012 -0800 @@ -47,7 +47,7 @@ public static boolean InlineMegamorphicCalls = true; public static int InliningPolicy = 0; public static int MaximumTrivialSize = 6; - public static int MaximumInlineLevel = 9; + public static int MaximumInlineLevel = 30; public static int MaximumDesiredSize = 6000; // WeightBasedInliningPolicy (0) public static boolean ParseBeforeInlining = ____; diff -r e6e14d25e608 -r fc78ad20ec38 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java Tue Feb 07 18:37:49 2012 -0800 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java Wed Feb 08 20:30:47 2012 -0800 @@ -405,9 +405,12 @@ InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke; BeginNode exceptionEdge = invokeWithException.exceptionEdge(); ExceptionObjectNode exceptionObject = (ExceptionObjectNode) exceptionEdge.next(); + FrameState stateAfter = exceptionObject.stateAfter(); BeginNode newExceptionEdge = (BeginNode) exceptionEdge.copyWithInputs(); ExceptionObjectNode newExceptionObject = (ExceptionObjectNode) exceptionObject.copyWithInputs(); + // set new state (pop old exception object, push new one) + newExceptionObject.setStateAfter(stateAfter.duplicateModified(stateAfter.bci, stateAfter.rethrowException(), CiKind.Object, newExceptionObject)); newExceptionEdge.setNext(newExceptionObject); EndNode endNode = graph.add(new EndNode()); @@ -759,6 +762,7 @@ frameState.replaceAndDelete(stateAfter); } else if (frameState.bci == FrameState.AFTER_EXCEPTION_BCI) { if (frameState.isAlive()) { + // TODO (ch) it happens sometimes that we have a FrameState.AFTER_EXCEPTION_BCI but no stateAtExceptionEdge assert stateAtExceptionEdge != null; frameState.replaceAndDelete(stateAtExceptionEdge); } else {