changeset 4625:73f935f28920

in esa mode, check that values in stateAfter are all ready after LIRGen of a ValudeNode
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 17 Feb 2012 11:37:44 +0100
parents 3b632ae14d47
children ee91624e54e6
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java	Thu Feb 16 19:29:32 2012 +0100
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java	Fri Feb 17 11:37:44 2012 +0100
@@ -396,6 +396,7 @@
             if (stateAfter != null) {
                 lastState = stateAfter;
                 assert checkStartOperands(instr, lastState);
+                checkStateReady(lastState);
                 if (GraalOptions.TraceLIRGeneratorLevel >= 2) {
                     TTY.println("STATE CHANGE");
                     if (GraalOptions.TraceLIRGeneratorLevel >= 3) {
@@ -424,6 +425,15 @@
         }
     }
 
+    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 static boolean endsWithJump(Block block) {
         if (block.lir.size() == 0) {
             return false;