# HG changeset patch # User Tom Rodriguez # Date 1391476612 28800 # Node ID 82090a107bae85bb690b9ef74a694a5f69e1922c # Parent 1e01e2644a5db946e371d81aaa6199aca267b06d make sure pushed values are formatted correctly diff -r 1e01e2644a5d -r 82090a107bae 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 10:43:11 2014 -0800 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java Mon Feb 03 17:16:52 2014 -0800 @@ -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()));