Mercurial > hg > truffle
comparison graal/com.oracle.max.cri/src/com/sun/cri/ci/CiConstant.java @ 4169:f5328dda9714
Initial commit of SSA-based spill-all register assignment
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Wed, 28 Dec 2011 18:13:25 -0800 |
parents | bc8527f3071c |
children | de7b3e7ae528 |
comparison
equal
deleted
inserted
replaced
4168:0bc4815d2069 | 4169:f5328dda9714 |
---|---|
28 * instances that represent frequently used constant values, such as {@link #ZERO}. | 28 * instances that represent frequently used constant values, such as {@link #ZERO}. |
29 */ | 29 */ |
30 public final class CiConstant extends CiValue { | 30 public final class CiConstant extends CiValue { |
31 | 31 |
32 /** | 32 /** |
33 * | 33 * |
34 */ | 34 */ |
35 private static final long serialVersionUID = -6355452536852663986L; | 35 private static final long serialVersionUID = -6355452536852663986L; |
36 private static final CiConstant[] INT_CONSTANT_CACHE = new CiConstant[100]; | 36 private static final CiConstant[] INT_CONSTANT_CACHE = new CiConstant[100]; |
37 static { | 37 static { |
38 for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) { | 38 for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) { |
127 public boolean isNull() { | 127 public boolean isNull() { |
128 return kind.isObject() && object == null; | 128 return kind.isObject() && object == null; |
129 } | 129 } |
130 | 130 |
131 @Override | 131 @Override |
132 public String name() { | 132 public String toString() { |
133 return "const[" + kind.format(boxedValue()) + (kind != CiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]"; | 133 return kind.javaName + "[" + kind.format(boxedValue()) + (kind != CiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]"; |
134 } | 134 } |
135 | 135 |
136 /** | 136 /** |
137 * Gets this constant's value as a string. | 137 * Gets this constant's value as a string. |
138 * | 138 * |