changeset 19025:7577b9be8799

Add FrameMap.spillSlotRangeSize().
author Josef Eisl <josef.eisl@jku.at>
date Thu, 04 Dec 2014 14:17:24 +0100
parents caa39e9bf2b0
children 78532f14a3c9
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Wed Dec 03 23:10:53 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Thu Dec 04 14:17:24 2014 +0100
@@ -264,6 +264,16 @@
     }
 
     /**
+     * Returns the size of the stack slot range for {@code slots} objects.
+     *
+     * @param slots The number of slots.
+     * @return The size in byte
+     */
+    public int spillSlotRangeSize(int slots) {
+        return slots * getTarget().wordSize;
+    }
+
+    /**
      * Reserves a number of contiguous slots in the frame of the method being compiled. If the
      * requested number of slots is 0, this method returns {@code null}.
      *
@@ -279,7 +289,7 @@
         if (slots == 0) {
             return null;
         }
-        spillSize += (slots * getTarget().wordSize);
+        spillSize += spillSlotRangeSize(slots);
 
         if (!objects.isEmpty()) {
             assert objects.length() <= slots;