changeset 21046:d35d2ac04970

weakened check used by an assertion in the FrameStateAssignmentPhase
author Doug Simon <doug.simon@oracle.com>
date Mon, 20 Apr 2015 19:07:49 +0200
parents 934c6ec83d62
children 61730e3a9dce
files graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/BytecodeFrame.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/BytecodeFrame.java	Mon Apr 20 19:06:56 2015 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/BytecodeFrame.java	Mon Apr 20 19:07:49 2015 +0200
@@ -132,6 +132,13 @@
     public static final int INVALID_FRAMESTATE_BCI = -6;
 
     /**
+     * Determines if a given BCI matches one of the synthetic BCI contants defined in this class.
+     */
+    public static boolean isSyntheticBci(int bci) {
+        return bci < 0;
+    }
+
+    /**
      * Creates a new frame object.
      *
      * @param caller the caller frame (which may be {@code null})
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Mon Apr 20 19:06:56 2015 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Mon Apr 20 19:07:49 2015 +0200
@@ -293,6 +293,9 @@
      * is that a stateAfter is being transformed into a stateDuring, so the stack depth may change.
      */
     private boolean checkStackDepth(int oldBci, int oldStackSize, boolean oldDuringCall, boolean oldRethrowException, int newBci, int newStackSize, boolean newDuringCall, boolean newRethrowException) {
+        if (BytecodeFrame.isSyntheticBci(oldBci)) {
+            return true;
+        }
         /*
          * It would be nice to have a complete check of the shape of the FrameState based on a
          * dataflow of the bytecodes but for now just check for obvious expression stack depth