Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/ir/Constant.java @ 2805:c3f64b66fc78
Towards removing the next pointer from Constant and ArithmeticOp
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 19:57:56 +0200 |
parents | 7b7dbe19fafb |
children | 015be60afcf3 |
comparison
equal
deleted
inserted
replaced
2804:095162a84dcc | 2805:c3f64b66fc78 |
---|---|
31 | 31 |
32 /** | 32 /** |
33 * The {@code Constant} instruction represents a constant such as an integer value, | 33 * The {@code Constant} instruction represents a constant such as an integer value, |
34 * long, float, object reference, address, etc. | 34 * long, float, object reference, address, etc. |
35 */ | 35 */ |
36 public final class Constant extends Instruction { | 36 public final class Constant extends Value { |
37 | 37 |
38 private static final int INPUT_COUNT = 0; | 38 private static final int INPUT_COUNT = 0; |
39 private static final int SUCCESSOR_COUNT = 0; | 39 private static final int SUCCESSOR_COUNT = 0; |
40 | 40 |
41 public final CiConstant value; | 41 public final CiConstant value; |
162 public int valueNumber() { | 162 public int valueNumber() { |
163 return 0x50000000 | value.hashCode(); | 163 return 0x50000000 | value.hashCode(); |
164 } | 164 } |
165 | 165 |
166 @Override | 166 @Override |
167 public boolean valueEqual(Instruction i) { | 167 public boolean valueEqual(Node i) { |
168 return i instanceof Constant && ((Constant) i).value.equivalent(this.value); | 168 return i instanceof Constant && ((Constant) i).value.equivalent(this.value); |
169 } | 169 } |
170 | 170 |
171 @Override | 171 @Override |
172 public RiType declaredType() { | 172 public RiType declaredType() { |