diff graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2602:0c6564c254af

new node layout: BlockBegin, BlockEnd -Dc1x.dot=regex for pdf output escape dot graph labels (<, >, &)
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 06 May 2011 10:25:37 +0200
parents 768d77a1c7af
children 01c5c0443158
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 05 16:33:12 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Fri May 06 10:25:37 2011 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.graph.*;
 import com.sun.c1x.*;
 import com.sun.c1x.asm.*;
 import com.sun.c1x.debug.*;
@@ -37,10 +38,12 @@
  * Denotes the beginning of a basic block, and holds information
  * about the basic block, including the successor and
  * predecessor blocks, exception handlers, liveness information, etc.
- *
- * @author Ben L. Titzer
  */
 public final class BlockBegin extends Instruction {
+
+    private static final int INPUT_COUNT = 0;
+    private static final int SUCCESSOR_COUNT = 0;
+
     private static final List<BlockBegin> NO_HANDLERS = Collections.emptyList();
 
     /**
@@ -103,9 +106,10 @@
      * Constructs a new BlockBegin at the specified bytecode index.
      * @param bci the bytecode index of the start
      * @param blockID the ID of the block
+     * @param graph
      */
-    public BlockBegin(int bci, int blockID) {
-        super(CiKind.Illegal);
+    public BlockBegin(int bci, int blockID, Graph graph) {
+        super(CiKind.Illegal, INPUT_COUNT, SUCCESSOR_COUNT, graph);
         this.blockID = blockID;
         depthFirstNumber = -1;
         linearScanNumber = -1;
@@ -609,7 +613,7 @@
      * @return the number of successors
      */
     public int numberOfSux() {
-        return end.successors.size();
+        return end.blockSuccessorCount();
     }
 
     /**
@@ -618,7 +622,7 @@
      * @return the successor
      */
     public BlockBegin suxAt(int i) {
-        return end.successors.get(i);
+        return end.blockSuccessor(i);
     }
 
     /**