Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/ir/AccessArray.java @ 2541:0f9eeb15e636
More Value.Flag clean up.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 20:58:01 +0200 |
parents | 16b9a8b5ad39 |
children | fec99fc30af1 |
comparison
equal
deleted
inserted
replaced
2540:3fc322165071 | 2541:0f9eeb15e636 |
---|---|
41 * @param stateBefore the frame state before the instruction | 41 * @param stateBefore the frame state before the instruction |
42 */ | 42 */ |
43 public AccessArray(CiKind kind, Value array, FrameState stateBefore) { | 43 public AccessArray(CiKind kind, Value array, FrameState stateBefore) { |
44 super(kind, stateBefore); | 44 super(kind, stateBefore); |
45 this.array = array; | 45 this.array = array; |
46 if (array.isNonNull()) { | |
47 eliminateNullCheck(); | |
48 } | |
49 } | 46 } |
50 | 47 |
51 /** | 48 /** |
52 * Gets the instruction that produces the array object. | 49 * Gets the instruction that produces the array object. |
53 * @return the instruction that produces the array object | 50 * @return the instruction that produces the array object |
54 */ | 51 */ |
55 public Value array() { | 52 public Value array() { |
56 return array; | 53 return array; |
57 } | 54 } |
58 | 55 |
59 /** | |
60 * Clears the state if this instruction can (no longer) trap. | |
61 */ | |
62 @Override | |
63 public void runtimeCheckCleared() { | |
64 if (!canTrap()) { | |
65 clearState(); | |
66 } | |
67 } | |
68 | |
69 @Override | 56 @Override |
70 public void inputValuesDo(ValueClosure closure) { | 57 public void inputValuesDo(ValueClosure closure) { |
71 array = closure.apply(array); | 58 array = closure.apply(array); |
72 } | 59 } |
73 } | 60 } |