diff graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2634:4dd0573f510b

FrameState fixes.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 10:52:37 +0200
parents 62ff4a70f07e
children 8c02ca1e9eb1
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Tue May 10 18:12:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Wed May 11 10:52:37 2011 +0200
@@ -39,7 +39,7 @@
  * about the basic block, including the successor and
  * predecessor blocks, exception handlers, liveness information, etc.
  */
-public final class BlockBegin extends Instruction {
+public final class BlockBegin extends StateSplit {
 
     private static final int INPUT_COUNT = 1;
     private static final int INPUT_STATE_BEFORE = 0;
@@ -58,24 +58,17 @@
     }
 
     /**
-     * The frame state before execution of the first instruction in this block.
-     */
-    public FrameState stateBefore() {
-        return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE);
-    }
-
-    public FrameState setStateBefore(FrameState n) {
-        assert stateBefore() == null;
-        return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n);
-    }
-
-    /**
      * The last node in the block (which contains the successors).
      */
     public BlockEnd end() {
         return (BlockEnd) successors().get(super.successorCount() + SUCCESSOR_END);
     }
 
+    @Override
+    public boolean needsStateAfter() {
+        return false;
+    }
+
     public void setEnd(BlockEnd end) {
         assert end != null;
         BlockEnd old = this.end();
@@ -124,8 +117,6 @@
      */
     private int blockFlags;
 
-    private FrameState stateAfter;
-
     /**
      * The {@link BlockBegin} nodes for which this node is a successor.
      */
@@ -215,15 +206,6 @@
         return loopIndex;
     }
 
-    public void setStateAfter(FrameState stateAfter) {
-        this.stateAfter = stateAfter;
-    }
-
-    @Override
-    public FrameState stateAfter() {
-        return stateAfter;
-    }
-
     /**
      * Gets the exception handlers that cover one or more instructions of this basic block.
      *