# HG changeset patch # User Thomas Wuerthinger # Date 1305816397 -7200 # Node ID e2d20fc3760fdb7d0ceb3051018342d7b0164495 # Parent 173067211acbf57fe8644b25d0b6a1c26a7349ae Removed last BlockBegin flag. diff -r 173067211acb -r e2d20fc3760f graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java --- 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; diff -r 173067211acb -r e2d20fc3760f graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java --- 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 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) {