changeset 13865:b77c09786445

Merge.
author Christian Humer <christian.humer@gmail.com>
date Tue, 04 Feb 2014 13:19:16 +0100
parents 5365f8d35b06 (current diff) 82090a107bae (diff)
children 2caa107f51ce
files
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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<ValueNode> 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()));