comparison graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java @ 2541:0f9eeb15e636

More Value.Flag clean up.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 20:58:01 +0200
parents 16b9a8b5ad39
children 768d77a1c7af
comparison
equal deleted inserted replaced
2540:3fc322165071 2541:0f9eeb15e636
37 * control flow operators, phi statements, method calls, the start of basic blocks, and 37 * control flow operators, phi statements, method calls, the start of basic blocks, and
38 * the end of basic blocks. 38 * the end of basic blocks.
39 * 39 *
40 * Instruction nodes are chained together in a basic block through the embedded 40 * Instruction nodes are chained together in a basic block through the embedded
41 * {@link Instruction#next} field. An Instruction may also have a list of {@link ExceptionHandler}s. 41 * {@link Instruction#next} field. An Instruction may also have a list of {@link ExceptionHandler}s.
42 *
43 *
44 * @author Ben L. Titzer
45 */ 42 */
46 public abstract class Instruction extends Value { 43 public abstract class Instruction extends Value {
47 44
48 public static final int INVOCATION_ENTRY_BCI = -1; // XXX: not currently used
49 public static final int SYNCHRONIZATION_ENTRY_BCI = -1; 45 public static final int SYNCHRONIZATION_ENTRY_BCI = -1;
50 46
51 /** 47 /**
52 * Index of bytecode that generated this node when appended in a basic block. 48 * Index of bytecode that generated this node when appended in a basic block.
53 * Negative values indicate special cases. 49 * Negative values indicate special cases.
218 public final String name() { 214 public final String name() {
219 return getClass().getSimpleName(); 215 return getClass().getSimpleName();
220 } 216 }
221 217
222 /** 218 /**
223 * Tests whether this instruction can trap. This is conservative; it does not take
224 * into account analysis results that may eliminate the possibility of this
225 * instruction from trapping.
226 *
227 * @return {@code true} if this instruction can cause a trap.
228 */
229 public boolean canTrap() {
230 return false;
231 }
232
233 /**
234 * Apply the specified closure to all the values of this instruction, including 219 * Apply the specified closure to all the values of this instruction, including
235 * input values, state values, and other values. 220 * input values, state values, and other values.
236 * @param closure the closure to apply 221 * @param closure the closure to apply
237 */ 222 */
238 public final void allValuesDo(ValueClosure closure) { 223 public final void allValuesDo(ValueClosure closure) {