diff graal/GraalCompiler/src/com/sun/c1x/value/FrameStateBuilder.java @ 2768:43ffa0e47a46

Towards removing stateAfter on BlockEnd.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 23 May 2011 19:21:53 +0200
parents 5e8a69041cd7
children 056e392d63d4
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameStateBuilder.java	Mon May 23 16:23:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameStateBuilder.java	Mon May 23 19:21:53 2011 +0200
@@ -118,6 +118,7 @@
      * @param x the instruction to push onto the stack
      */
     public void xpush(Value x) {
+        assert x == null || !x.isDeleted();
         stack[stackIndex++] = x;
     }
 
@@ -204,7 +205,9 @@
      * @return x the instruction popped off the stack
      */
     public Value xpop() {
-        return stack[--stackIndex];
+        Value result = stack[--stackIndex];
+        assert result == null || !result.isDeleted();
+        return result;
     }
 
     /**