changeset 19314:21a3a49fa1ca

Truffle: fix frame resize regression
author Andreas Woess <andreas.woess@oracle.com>
date Thu, 12 Feb 2015 11:48:23 +0100
parents a7247418a58b
children 1e7b1b00caa4
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Thu Feb 12 10:18:34 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Thu Feb 12 11:48:23 2015 +0100
@@ -243,26 +243,24 @@
 
     private void verifySet(FrameSlot slot, FrameSlotKind accessKind) {
         int slotIndex = slot.getIndex();
-        byte[] tagsArray = getTags();
-        if (slotIndex >= tagsArray.length) {
+        if (slotIndex >= getTags().length) {
             CompilerDirectives.transferToInterpreter();
             if (!resize()) {
                 throw new IllegalArgumentException(String.format("The frame slot '%s' is not known by the frame descriptor.", slot));
             }
         }
-        tagsArray[slotIndex] = (byte) accessKind.ordinal();
+        getTags()[slotIndex] = (byte) accessKind.ordinal();
     }
 
     private void verifyGet(FrameSlot slot, FrameSlotKind accessKind) throws FrameSlotTypeException {
         int slotIndex = slot.getIndex();
-        byte[] tagsArray = getTags();
-        if (slotIndex >= tagsArray.length) {
+        if (slotIndex >= getTags().length) {
             CompilerDirectives.transferToInterpreter();
             if (!resize()) {
                 throw new IllegalArgumentException(String.format("The frame slot '%s' is not known by the frame descriptor.", slot));
             }
         }
-        byte tag = tagsArray[slotIndex];
+        byte tag = this.getTags()[slotIndex];
         if (tag != accessKind.ordinal()) {
             CompilerDirectives.transferToInterpreter();
             throw new FrameSlotTypeException();