Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/ir/Value.java @ 2801:2af109bec0c0
Make block contains a list of nodes instead a list of instructions.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 15:11:34 +0200 |
parents | d3fc4fe063bf |
children | f57594d3cd78 |
comparison
equal
deleted
inserted
replaced
2800:e3a0630a1dab | 2801:2af109bec0c0 |
---|---|
54 */ | 54 */ |
55 private int flags; | 55 private int flags; |
56 | 56 |
57 protected CiValue operand = CiValue.IllegalValue; | 57 protected CiValue operand = CiValue.IllegalValue; |
58 | 58 |
59 /** | |
60 * Used by {@link InstructionSubstituter}. | |
61 */ | |
62 public Value subst; | |
63 | |
64 public abstract Merge block(); | 59 public abstract Merge block(); |
65 | 60 |
66 /** | 61 /** |
67 * Creates a new value with the specified kind. | 62 * Creates a new value with the specified kind. |
68 * @param kind the type of this value | 63 * @param kind the type of this value |
85 } | 80 } |
86 | 81 |
87 @Override | 82 @Override |
88 protected Object clone() throws CloneNotSupportedException { | 83 protected Object clone() throws CloneNotSupportedException { |
89 throw new CloneNotSupportedException(); | 84 throw new CloneNotSupportedException(); |
90 } | |
91 | |
92 ///////////////// | |
93 | |
94 /** | |
95 * Gets the instruction that should be substituted for this one. Note that this | |
96 * method is recursive; if the substituted instruction has a substitution, then | |
97 * the final substituted instruction will be returned. If there is no substitution | |
98 * for this instruction, {@code this} will be returned. | |
99 * @return the substitution for this instruction | |
100 */ | |
101 public final Value subst() { | |
102 if (subst == null) { | |
103 return this; | |
104 } | |
105 return subst.subst(); | |
106 } | |
107 | |
108 /** | |
109 * Checks whether this instruction has a substitute. | |
110 * @return {@code true} if this instruction has a substitution. | |
111 */ | |
112 public final boolean hasSubst() { | |
113 return subst != null; | |
114 } | 85 } |
115 | 86 |
116 /** | 87 /** |
117 * Check whether this instruction has the specified flag set. | 88 * Check whether this instruction has the specified flag set. |
118 * @param flag the flag to test | 89 * @param flag the flag to test |