# HG changeset patch # User Doug Simon # Date 1429549669 -7200 # Node ID d35d2ac04970cb9eb52e456112b332a3bfe5f6d9 # Parent 934c6ec83d620af19f38bfcfcdb4499db1dc69b1 weakened check used by an assertion in the FrameStateAssignmentPhase diff -r 934c6ec83d62 -r d35d2ac04970 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/BytecodeFrame.java --- 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}) diff -r 934c6ec83d62 -r d35d2ac04970 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java --- 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