Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/value/MutableFrameState.java @ 2610:39aa89baa165
cleanup: FrameState copy methods, ImmutableFrameState
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 06 May 2011 13:03:33 +0200 |
parents | cc1f1d396288 |
children |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/value/MutableFrameState.java Fri May 06 11:18:15 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/value/MutableFrameState.java Fri May 06 13:03:33 2011 +0200 @@ -39,8 +39,6 @@ * Contrariwise and as an optimization, an instance referenced as {@code MutableFrameState} can be assigned to * a variable, field, or method parameter of type {@link FrameState} without creating an immutable copy before * (using {@link #immutableCopy(int)}) if the state is not mutated after the assignment. - * - * @author Michael Duller */ public final class MutableFrameState extends FrameState { @@ -49,41 +47,6 @@ } /** - * Replace the local variables in this frame state with the local variables from the specified frame state. This is - * used in inlining. - * - * @param with the frame state containing the new local variables - */ - public void replaceLocals(FrameState with) { - assert with.maxLocals == maxLocals; - System.arraycopy(with.values, 0, values, 0, maxLocals); - } - - /** - * Replace the stack in this frame state with the stack from the specified frame state. This is used in inlining. - * - * @param with the frame state containing the new local variables - */ - public void replaceStack(FrameState with) { - System.arraycopy(with.values, with.maxLocals, values, maxLocals, with.stackIndex); - stackIndex = with.stackIndex; - assert stackIndex >= 0; - } - - /** - * Replace the locks in this frame state with the locks from the specified frame state. This is used in inlining. - * - * @param with the frame state containing the new local variables - */ - public void replaceLocks(FrameState with) { - if (with.locks == null) { - locks = null; - } else { - locks = Util.uncheckedCast(with.locks.clone()); - } - } - - /** * Clears all values on this stack. */ public void clearStack() { @@ -349,7 +312,7 @@ * @param bci the bytecode index of the new frame state */ public FrameState immutableCopy(int bci) { - return copy(bci, true, true, true); + return immutableCopy(bci, true, true, true); } private static void assertHigh(Value x) {