comparison graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java @ 2622:91d3952f7eb7

Framestate work : using stateAFter and reducting the number of nodes with framestates. Intermediate state (does not pass tests)
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 10 May 2011 12:37:46 +0200
parents 3558ca7088c0
children 62ff4a70f07e
comparison
equal deleted inserted replaced
2621:dd115f80acf8 2622:91d3952f7eb7
235 * input values, state values, and other values. 235 * input values, state values, and other values.
236 * @param closure the closure to apply 236 * @param closure the closure to apply
237 */ 237 */
238 public final void allValuesDo(ValueClosure closure) { 238 public final void allValuesDo(ValueClosure closure) {
239 inputValuesDo(closure); 239 inputValuesDo(closure);
240 FrameState stateBefore = stateBefore();
241 if (stateBefore != null) {
242 stateBefore.inputValuesDo(closure);
243 }
244 FrameState stateAfter = stateAfter(); 240 FrameState stateAfter = stateAfter();
245 if (stateAfter != null) { 241 if (stateAfter != null) {
246 stateAfter.inputValuesDo(closure); 242 stateAfter.inputValuesDo(closure);
247 } 243 }
248 } 244 }
249 245
250 /** 246 /**
251 * Gets the state before the instruction, if it is recorded.
252 * @return the state before the instruction
253 */
254 public FrameState stateBefore() {
255 return null;
256 }
257
258 /**
259 * Gets the state after the instruction, if it is recorded. Typically only 247 * Gets the state after the instruction, if it is recorded. Typically only
260 * instances of {@link BlockEnd} have a non-null state after. 248 * instances of {@link BlockEnd} have a non-null state after.
261 * @return the state after the instruction 249 * @return the state after the instruction
262 */ 250 */
263 public FrameState stateAfter() { 251 public FrameState stateAfter() {