Mercurial > hg > graal-jvmci-8
changeset 4628:d882b9baea6e
check all framestates in LIRGen assert
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 17 Feb 2012 13:17:42 +0100 |
parents | 7d928ba6f3f2 |
children | 29da09bf4930 |
files | graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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) {