comparison graal/com.oracle.max.cri/src/com/sun/cri/ci/CiStackSlot.java @ 4182:de7b3e7ae528

Simplify CiValue
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Mon, 02 Jan 2012 14:38:17 -0800
parents 319860ae697a
children
comparison
equal deleted inserted replaced
4181:319860ae697a 4182:de7b3e7ae528
27 /** 27 /**
28 * Represents a compiler spill slot or an outgoing stack-based argument in a method's frame 28 * Represents a compiler spill slot or an outgoing stack-based argument in a method's frame
29 * or an incoming stack-based argument in a method's {@linkplain #inCallerFrame() caller's frame}. 29 * or an incoming stack-based argument in a method's {@linkplain #inCallerFrame() caller's frame}.
30 */ 30 */
31 public final class CiStackSlot extends CiValue { 31 public final class CiStackSlot extends CiValue {
32
33 private static final long serialVersionUID = -7725071921307318433L; 32 private static final long serialVersionUID = -7725071921307318433L;
34 33
35 private final int offset; 34 private final int offset;
36 private final boolean addFrameSize; 35 private final boolean addFrameSize;
37 36
117 } 116 }
118 return false; 117 return false;
119 } 118 }
120 119
121 @Override 120 @Override
122 public boolean equalsIgnoringKind(CiValue o) {
123 if (o == this) {
124 return true;
125 }
126 if (o instanceof CiStackSlot) {
127 CiStackSlot l = (CiStackSlot) o;
128 return l.offset == offset && l.addFrameSize == addFrameSize;
129 }
130 return false;
131 }
132
133 @Override
134 public String toString() { 121 public String toString() {
135 String s; 122 String s;
136 if (!addFrameSize) { 123 if (!addFrameSize) {
137 s = "out:"; 124 s = "out:";
138 } else if (offset >= 0) { 125 } else if (offset >= 0) {