# HG changeset patch # User Christian Humer # Date 1391516356 -3600 # Node ID b77c097864451bdedec8ec25130573cd5020b1b1 # Parent 5365f8d35b06b67b345769bb3224a030fc32573c# Parent 82090a107bae85bb690b9ef74a694a5f69e1922c Merge. diff -r 5365f8d35b06 -r b77c09786445 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java Mon Feb 03 21:11:36 2014 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java Tue Feb 04 13:19:16 2014 +0100 @@ -244,8 +244,8 @@ /** * Creates a copy of this frame state with one stack element of type popKind popped from the - * stack and the values in pushedValues pushed on the stack. The pushedValues are expected to be - * in slot encoding: a long or double is followed by a null slot. + * stack and the values in pushedValues pushed on the stack. The pushedValues will be formatted + * correctly in slot encoding: a long or double will be followed by a null slot. */ public FrameState duplicateModified(int newBci, boolean newRethrowException, Kind popKind, ValueNode... pushedValues) { ArrayList copy = new ArrayList<>(values.subList(0, localsSize + stackSize)); @@ -257,7 +257,12 @@ assert lastSlot.kind().getStackKind() == popKind.getStackKind(); copy.remove(copy.size() - 1); } - Collections.addAll(copy, pushedValues); + for (ValueNode node : pushedValues) { + copy.add(node); + if (node.kind() == Kind.Long || node.kind() == Kind.Double) { + copy.add(null); + } + } int newStackSize = copy.size() - localsSize; copy.addAll(values.subList(localsSize + stackSize, values.size()));