Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/ir/Value.java @ 2851:14708c03abba
Remove isNonNull
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 11:36:32 +0200 |
parents | bfce42cd9c07 |
children |
comparison
equal
deleted
inserted
replaced
2850:7474789a8120 | 2851:14708c03abba |
---|---|
39 * The kind of this value. This is {@link CiKind#Void} for instructions that produce no value. | 39 * The kind of this value. This is {@link CiKind#Void} for instructions that produce no value. |
40 * This kind is guaranteed to be a {@linkplain CiKind#stackKind() stack kind}. | 40 * This kind is guaranteed to be a {@linkplain CiKind#stackKind() stack kind}. |
41 */ | 41 */ |
42 public final CiKind kind; | 42 public final CiKind kind; |
43 | 43 |
44 private boolean isNonNull; | |
45 | |
46 protected CiValue operand = CiValue.IllegalValue; | 44 protected CiValue operand = CiValue.IllegalValue; |
47 | 45 |
48 /** | 46 /** |
49 * Creates a new value with the specified kind. | 47 * Creates a new value with the specified kind. |
50 * @param kind the type of this value | 48 * @param kind the type of this value |
62 // TODO: remove when Value class changes are completed | 60 // TODO: remove when Value class changes are completed |
63 | 61 |
64 @Override | 62 @Override |
65 protected Object clone() throws CloneNotSupportedException { | 63 protected Object clone() throws CloneNotSupportedException { |
66 throw new CloneNotSupportedException(); | 64 throw new CloneNotSupportedException(); |
67 } | |
68 | |
69 /** | |
70 * Checks whether this instruction produces a value which is guaranteed to be non-null. | |
71 * @return {@code true} if this instruction's value is not null | |
72 */ | |
73 public boolean isNonNull() { | |
74 return isNonNull; | |
75 } | |
76 | |
77 public void setNonNull(boolean isNonNull) { | |
78 this.isNonNull = isNonNull; | |
79 } | 65 } |
80 | 66 |
81 /** | 67 /** |
82 * Checks whether this value is a constant (i.e. it is of type {@link Constant}. | 68 * Checks whether this value is a constant (i.e. it is of type {@link Constant}. |
83 * @return {@code true} if this value is a constant | 69 * @return {@code true} if this value is a constant |
175 return builder.toString(); | 161 return builder.toString(); |
176 } | 162 } |
177 | 163 |
178 public String flagsToString() { | 164 public String flagsToString() { |
179 StringBuilder sb = new StringBuilder(); | 165 StringBuilder sb = new StringBuilder(); |
180 if (isNonNull()) { | |
181 sb.append("NonNull"); | |
182 } | |
183 return sb.toString(); | 166 return sb.toString(); |
184 } | 167 } |
185 | 168 |
186 /** | 169 /** |
187 * Compute the value number of this Instruction. Local and global value numbering | 170 * Compute the value number of this Instruction. Local and global value numbering |
217 | 200 |
218 @Override | 201 @Override |
219 public Map<Object, Object> getDebugProperties() { | 202 public Map<Object, Object> getDebugProperties() { |
220 Map<Object, Object> properties = super.getDebugProperties(); | 203 Map<Object, Object> properties = super.getDebugProperties(); |
221 properties.put("kind", kind.toString()); | 204 properties.put("kind", kind.toString()); |
222 properties.put("nonNull", isNonNull); | |
223 properties.put("operand", operand == null ? "null" : operand.toString()); | 205 properties.put("operand", operand == null ? "null" : operand.toString()); |
224 return properties; | 206 return properties; |
225 } | 207 } |
226 | 208 |
227 | 209 |