# HG changeset patch # User Gilles Duboscq # Date 1329481062 -3600 # Node ID d882b9baea6ef5c279b7636f4ef53cb91f2d42e6 # Parent 7d928ba6f3f2544cf7dd8555b38e4d594244b3fd check all framestates in LIRGen assert diff -r 7d928ba6f3f2 -r d882b9baea6e graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Fri Feb 17 12:37:29 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Fri Feb 17 13:17:42 2012 +0100 @@ -396,7 +396,7 @@ if (stateAfter != null) { lastState = stateAfter; assert checkStartOperands(instr, lastState); - checkStateReady(lastState); + assert checkStateReady(lastState); if (GraalOptions.TraceLIRGeneratorLevel >= 2) { TTY.println("STATE CHANGE"); if (GraalOptions.TraceLIRGeneratorLevel >= 3) { @@ -425,13 +425,18 @@ } } - private void checkStateReady(FrameState state) { - for (int i = 0; i < state.valuesSize(); i++) { - ValueNode v = state.valueAt(i); - if (v != null && !(v instanceof VirtualObjectNode)) { - assert operand(v) != null : "Value " + v + " in " + state + " is not ready!"; + private boolean checkStateReady(FrameState state) { + FrameState fs = state; + while (fs != null) { + for (int i = 0; i < fs.valuesSize(); i++) { + ValueNode v = fs.valueAt(i); + if (v != null && !(v instanceof VirtualObjectNode)) { + assert operand(v) != null : "Value " + v + " in " + fs + " is not ready!"; + } } + fs = fs.outerFrameState(); } + return true; } private static boolean endsWithJump(Block block) {