Mercurial > hg > truffle
comparison graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/cfg/AbstractControlFlowGraph.java @ 18163:c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 24 Oct 2014 16:18:10 +0200 |
parents | 586c1bdd73b8 |
children | 4d70d150944f |
comparison
equal
deleted
inserted
replaced
18162:ab62800259ff | 18163:c88ab4f1f04a |
---|---|
26 | 26 |
27 import com.oracle.graal.compiler.common.*; | 27 import com.oracle.graal.compiler.common.*; |
28 | 28 |
29 public interface AbstractControlFlowGraph<T extends AbstractBlock<T>> { | 29 public interface AbstractControlFlowGraph<T extends AbstractBlock<T>> { |
30 | 30 |
31 static final int BLOCK_ID_INITIAL = -1; | 31 int BLOCK_ID_INITIAL = -1; |
32 static final int BLOCK_ID_VISITED = -2; | 32 int BLOCK_ID_VISITED = -2; |
33 | 33 |
34 /** | 34 /** |
35 * Returns the list blocks contained in this control flow graph. | 35 * Returns the list blocks contained in this control flow graph. |
36 * | 36 * |
37 * It is {@linkplain CFGVerifier guaranteed} that the blocks are numbered and ordered according | 37 * It is {@linkplain CFGVerifier guaranteed} that the blocks are numbered and ordered according |
102 * Note that this algorithm makes use of special properties regarding the numbering of blocks. | 102 * Note that this algorithm makes use of special properties regarding the numbering of blocks. |
103 * | 103 * |
104 * @see #getBlocks() | 104 * @see #getBlocks() |
105 * @see CFGVerifier | 105 * @see CFGVerifier |
106 */ | 106 */ |
107 public static AbstractBlock<?> commonDominator(AbstractBlock<?> a, AbstractBlock<?> b) { | 107 static AbstractBlock<?> commonDominator(AbstractBlock<?> a, AbstractBlock<?> b) { |
108 if (a == null) { | 108 if (a == null) { |
109 return b; | 109 return b; |
110 } | 110 } |
111 if (b == null) { | 111 if (b == null) { |
112 return a; | 112 return a; |
126 | 126 |
127 /** | 127 /** |
128 * @see AbstractControlFlowGraph#commonDominator(AbstractBlock, AbstractBlock) | 128 * @see AbstractControlFlowGraph#commonDominator(AbstractBlock, AbstractBlock) |
129 */ | 129 */ |
130 @SuppressWarnings("unchecked") | 130 @SuppressWarnings("unchecked") |
131 public static <T extends AbstractBlock<T>> T commonDominatorTyped(T a, T b) { | 131 static <T extends AbstractBlock<T>> T commonDominatorTyped(T a, T b) { |
132 return (T) commonDominator(a, b); | 132 return (T) commonDominator(a, b); |
133 } | 133 } |
134 } | 134 } |