Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/sun/c1x/ir/StateSplit.java @ 2634:4dd0573f510b
FrameState fixes.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 10:52:37 +0200 |
parents | 569228710be8 |
children | 440ceca8e3d7 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/StateSplit.java Tue May 10 18:12:26 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/StateSplit.java Wed May 11 10:52:37 2011 +0200 @@ -32,8 +32,9 @@ */ public abstract class StateSplit extends Instruction { - private static final int INPUT_COUNT = 1; + private static final int INPUT_COUNT = 2; private static final int INPUT_STATE_AFTER = 0; + private static final int INPUT_STATE_BEFORE = 1; private static final int SUCCESSOR_COUNT = 0; @@ -56,10 +57,25 @@ } public FrameState setStateAfter(FrameState n) { + if (n != null && this instanceof BlockBegin) { + Exception e = new Exception(); + e.printStackTrace(); + } return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_AFTER, n); } /** + * The state for this instruction. + */ + public FrameState stateBefore() { + return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE); + } + + public FrameState setStateBefore(FrameState n) { + return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n); + } + + /** * Creates a new state split with the specified value type. * @param kind the type of the value that this instruction produces * @param inputCount