changeset 19385:9a13d6b25b34

Fix for new frame implementation.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 15 Feb 2015 20:18:58 +0100
parents a1edf4524d84
children 664b396dbe64
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Sun Feb 15 18:04:42 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Sun Feb 15 20:18:58 2015 +0100
@@ -66,7 +66,7 @@
         int index = slot.getIndex();
         Object[] curLocals = this.getLocals();
         if (CompilerDirectives.inInterpreter() && index >= curLocals.length) {
-            resizeAndCheck(slot);
+            curLocals = resizeAndCheck(slot);
         }
         return curLocals[index];
     }
@@ -80,7 +80,7 @@
         int index = slot.getIndex();
         Object[] curLocals = this.getLocals();
         if (CompilerDirectives.inInterpreter() && index >= curLocals.length) {
-            resizeAndCheck(slot);
+            curLocals = resizeAndCheck(slot);
         }
         curLocals[index] = value;
     }
@@ -174,10 +174,11 @@
         return this.descriptor;
     }
 
-    private void resizeAndCheck(FrameSlot slot) {
+    private Object[] resizeAndCheck(FrameSlot slot) {
         if (!resize()) {
             throw new IllegalArgumentException(String.format("The frame slot '%s' is not known by the frame descriptor.", slot));
         }
+        return locals;
     }
 
     @Override