# HG changeset patch # User Josef Eisl # Date 1417699044 -3600 # Node ID 7577b9be879934ddea18b577208fa8dfdd002e6f # Parent caa39e9bf2b0dfeaf9bc3adcc3a536943a220bb8 Add FrameMap.spillSlotRangeSize(). diff -r caa39e9bf2b0 -r 7577b9be8799 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java --- 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;