comparison graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java @ 2538:e1ba5a93e997

Clean up on Value class and LIRGenerator/LIRItem-related things.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 20:13:54 +0200
parents 16b9a8b5ad39
children fa3bda50cbfd
comparison
equal deleted inserted replaced
2537:4a016ff4d2df 2538:e1ba5a93e997
37 public abstract class BlockEnd extends Instruction { 37 public abstract class BlockEnd extends Instruction {
38 38
39 BlockBegin begin; 39 BlockBegin begin;
40 final List<BlockBegin> successors; 40 final List<BlockBegin> successors;
41 FrameState stateAfter; 41 FrameState stateAfter;
42 boolean isSafepoint;
42 43
43 /** 44 /**
44 * Constructs a new block end with the specified value type. 45 * Constructs a new block end with the specified value type.
45 * @param kind the type of the value produced by this instruction 46 * @param kind the type of the value produced by this instruction
46 * @param stateAfter the frame state at the end of this block 47 * @param stateAfter the frame state at the end of this block
49 */ 50 */
50 public BlockEnd(CiKind kind, FrameState stateAfter, boolean isSafepoint, List<BlockBegin> successors) { 51 public BlockEnd(CiKind kind, FrameState stateAfter, boolean isSafepoint, List<BlockBegin> successors) {
51 super(kind); 52 super(kind);
52 this.successors = successors == null ? new ArrayList<BlockBegin>(2) : successors; 53 this.successors = successors == null ? new ArrayList<BlockBegin>(2) : successors;
53 setStateAfter(stateAfter); 54 setStateAfter(stateAfter);
54 if (isSafepoint) { 55 this.isSafepoint = isSafepoint;
55 setFlag(Value.Flag.IsSafepoint);
56 }
57 } 56 }
58 57
59 public BlockEnd(CiKind kind, FrameState stateAfter, boolean isSafepoint) { 58 public BlockEnd(CiKind kind, FrameState stateAfter, boolean isSafepoint) {
60 this(kind, stateAfter, isSafepoint, null); 59 this(kind, stateAfter, isSafepoint, null);
61 } 60 }
75 /** 74 /**
76 * Checks whether this instruction is a safepoint. 75 * Checks whether this instruction is a safepoint.
77 * @return {@code true} if this instruction is a safepoint 76 * @return {@code true} if this instruction is a safepoint
78 */ 77 */
79 public boolean isSafepoint() { 78 public boolean isSafepoint() {
80 return checkFlag(Value.Flag.IsSafepoint); 79 return isSafepoint;
81 } 80 }
82 81
83 /** 82 /**
84 * Gets the block begin associated with this block end. 83 * Gets the block begin associated with this block end.
85 * @return the beginning of this basic block 84 * @return the beginning of this basic block