comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiFrame.java @ 5506:56860d3f9f39

More refactorings and renamings in preparation of ci/ri split.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 07 Jun 2012 18:12:01 +0200
parents 2fac5abf145f
children dc71b06d09f8
comparison
equal deleted inserted replaced
5505:28af6dff047f 5506:56860d3f9f39
26 26
27 import com.oracle.max.cri.ri.*; 27 import com.oracle.max.cri.ri.*;
28 28
29 /** 29 /**
30 * Represents the Java bytecode frame state(s) at a given position 30 * Represents the Java bytecode frame state(s) at a given position
31 * including {@link CiValue locations} where to find the local variables, 31 * including {@link RiValue locations} where to find the local variables,
32 * operand stack values and locked objects of the bytecode frame(s). 32 * operand stack values and locked objects of the bytecode frame(s).
33 */ 33 */
34 public class CiFrame extends CiCodePos implements Serializable { 34 public class CiFrame extends CiCodePos implements Serializable {
35 private static final long serialVersionUID = -345025397165977565L; 35 private static final long serialVersionUID = -345025397165977565L;
36 36
46 * </table> 46 * </table>
47 * <p> 47 * <p>
48 * Note that the number of locals and the number of stack slots may be smaller than the 48 * Note that the number of locals and the number of stack slots may be smaller than the
49 * maximum number of locals and stack slots as specified in the compiled method. 49 * maximum number of locals and stack slots as specified in the compiled method.
50 */ 50 */
51 public final CiValue[] values; 51 public final RiValue[] values;
52 52
53 /** 53 /**
54 * The number of locals in the values array. 54 * The number of locals in the values array.
55 */ 55 */
56 public final int numLocals; 56 public final int numLocals;
85 * @param values the frame state {@link #values} 85 * @param values the frame state {@link #values}
86 * @param numLocals the number of local variables 86 * @param numLocals the number of local variables
87 * @param numStack the depth of the stack 87 * @param numStack the depth of the stack
88 * @param numLocks the number of locked objects 88 * @param numLocks the number of locked objects
89 */ 89 */
90 public CiFrame(CiFrame caller, RiResolvedMethod method, int bci, boolean rethrowException, boolean duringCall, CiValue[] values, int numLocals, int numStack, int numLocks, long leafGraphId) { 90 public CiFrame(CiFrame caller, RiResolvedMethod method, int bci, boolean rethrowException, boolean duringCall, RiValue[] values, int numLocals, int numStack, int numLocks, long leafGraphId) {
91 super(caller, method, bci); 91 super(caller, method, bci);
92 assert values != null; 92 assert values != null;
93 this.rethrowException = rethrowException; 93 this.rethrowException = rethrowException;
94 this.duringCall = duringCall; 94 this.duringCall = duringCall;
95 this.values = values; 95 this.values = values;
103 /** 103 /**
104 * Gets the value representing the specified local variable. 104 * Gets the value representing the specified local variable.
105 * @param i the local variable index 105 * @param i the local variable index
106 * @return the value that can be used to reconstruct the local's current value 106 * @return the value that can be used to reconstruct the local's current value
107 */ 107 */
108 public CiValue getLocalValue(int i) { 108 public RiValue getLocalValue(int i) {
109 return values[i]; 109 return values[i];
110 } 110 }
111 111
112 /** 112 /**
113 * Gets the value representing the specified stack slot. 113 * Gets the value representing the specified stack slot.
114 * @param i the stack index 114 * @param i the stack index
115 * @return the value that can be used to reconstruct the stack slot's current value 115 * @return the value that can be used to reconstruct the stack slot's current value
116 */ 116 */
117 public CiValue getStackValue(int i) { 117 public RiValue getStackValue(int i) {
118 return values[i + numLocals]; 118 return values[i + numLocals];
119 } 119 }
120 120
121 /** 121 /**
122 * Gets the value representing the specified lock. 122 * Gets the value representing the specified lock.
123 * @param i the lock index 123 * @param i the lock index
124 * @return the value that can be used to reconstruct the lock's current value 124 * @return the value that can be used to reconstruct the lock's current value
125 */ 125 */
126 public CiValue getLockValue(int i) { 126 public RiValue getLockValue(int i) {
127 return values[i + numLocals + numStack]; 127 return values[i + numLocals + numStack];
128 } 128 }
129 129
130 /** 130 /**
131 * Gets the caller of this frame. 131 * Gets the caller of this frame.