changeset 2724:e2d20fc3760f

Removed last BlockBegin flag.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 16:46:37 +0200
parents 173067211acb
children c379183d1c54
files graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java
diffstat 2 files changed, 5 insertions(+), 69 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Thu May 19 16:44:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Thu May 19 16:46:37 2011 +0200
@@ -155,7 +155,7 @@
             BlockMap.Block block = blockMap.blocks.get(i);
             BlockBegin blockBegin = new BlockBegin(block.startBci, ir.nextBlockNumber(), graph);
             if (block.isLoopHeader) {
-                blockBegin.setBlockFlag(BlockBegin.BlockFlag.ParserLoopHeader);
+                blockBegin.setParserLoopHeader(true);
             }
             blockBegin.setDepthFirstNumber(blockBegin.blockID);
             blockList[block.startBci] = blockBegin;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 19 16:44:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 19 16:46:37 2011 +0200
@@ -77,15 +77,6 @@
     private static final List<BlockBegin> NO_HANDLERS = Collections.emptyList();
 
     /**
-     * An enumeration of flags for block entries indicating various things.
-     */
-    public enum BlockFlag {
-        ParserLoopHeader;
-
-        public final int mask = 1 << ordinal();
-    }
-
-    /**
      * A unique id used in tracing.
      */
     public final int blockID;
@@ -98,8 +89,6 @@
     private int depthFirstNumber;
     private int linearScanNumber;
 
-    private BlockBegin dominator;
-
     // LIR block
     private LIRBlock lirBlock;
 
@@ -141,14 +130,6 @@
     }
 
     /**
-     * Sets the dominator block for this block.
-     * @param dominator the dominator for this block
-     */
-    public void setDominator(BlockBegin dominator) {
-        this.dominator = dominator;
-    }
-
-    /**
      * Gets the depth first traversal number of this block.
      * @return the depth first number
      */
@@ -174,35 +155,6 @@
     }
 
     /**
-     * Set a flag on this block.
-     * @param flag the flag to set
-     */
-    public void setBlockFlag(BlockFlag flag) {
-        blockFlags |= flag.mask;
-    }
-
-    /**
-     * Clear a flag on this block.
-     * @param flag the flag to clear
-     */
-    public void clearBlockFlag(BlockFlag flag) {
-        blockFlags &= ~flag.mask;
-    }
-
-    public void copyBlockFlag(BlockBegin other, BlockFlag flag) {
-        setBlockFlag(flag, other.checkBlockFlag(flag));
-    }
-
-    /**
-     * Check whether this block has the specified flag set.
-     * @param flag the flag to test
-     * @return {@code true} if this block has the flag
-     */
-    public boolean checkBlockFlag(BlockFlag flag) {
-        return (blockFlags & flag.mask) != 0;
-    }
-
-    /**
      * Iterate over this block, its exception handlers, and its successors, in that order.
      * @param closure the closure to apply to each block
      */
@@ -392,20 +344,14 @@
         }
     }
 
+    boolean parserLoopHeader;
+
     public boolean isParserLoopHeader() {
-        return checkBlockFlag(BlockFlag.ParserLoopHeader);
+        return parserLoopHeader;
     }
 
     public void setParserLoopHeader(boolean value) {
-        setBlockFlag(BlockFlag.ParserLoopHeader, value);
-    }
-
-    private void setBlockFlag(BlockFlag flag, boolean value) {
-        if (value) {
-            setBlockFlag(flag);
-        } else {
-            clearBlockFlag(flag);
-        }
+        parserLoopHeader = value;
     }
 
     @Override
@@ -416,16 +362,6 @@
         builder.append(",");
         builder.append(depthFirstNumber);
         builder.append(" [");
-        boolean hasFlag = false;
-        for (BlockFlag f : BlockFlag.values()) {
-            if (checkBlockFlag(f)) {
-                if (hasFlag) {
-                    builder.append(' ');
-                }
-                builder.append(f.name());
-                hasFlag = true;
-            }
-        }
 
         builder.append("]");
         if (end() != null) {