Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/ir/StateSplit.java @ 2730:027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 19 May 2011 17:24:23 +0200 |
parents | 7ed72769d51a |
children |
comparison
equal
deleted
inserted
replaced
2729:108adba3345e | 2730:027adfafd47e |
---|---|
54 public FrameState stateBefore() { | 54 public FrameState stateBefore() { |
55 return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE); | 55 return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE); |
56 } | 56 } |
57 | 57 |
58 public FrameState setStateBefore(FrameState n) { | 58 public FrameState setStateBefore(FrameState n) { |
59 return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n); | 59 FrameState oldState = stateBefore(); |
60 try { | |
61 return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n); | |
62 } finally { | |
63 if (oldState != n && oldState != null) { | |
64 oldState.delete(); | |
65 } | |
66 } | |
60 } | 67 } |
61 | 68 |
62 /** | 69 /** |
63 * The state for this instruction. | 70 * The state for this instruction. |
64 */ | 71 */ |