# HG changeset patch # User Doug Simon # Date 1363369839 -3600 # Node ID 02a3fd8a83083e39163e6b634fb8170a6bb8ee46 # Parent bb9fba66b6ef81c589d1c741eea465b5d6031a06 fixed issue preventing frame omission diff -r bb9fba66b6ef -r 02a3fd8a8308 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Mar 15 18:16:15 2013 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Mar 15 18:50:39 2013 +0100 @@ -186,6 +186,21 @@ */ public void finish() { assert this.frameSize == -1 : "must only be set once"; + if (freedSlots != null) { + // If the freed slots cover the complete spill area (except for the return + // address slot), then the spill size is reset to its initial value. + // Without this, frameNeedsAllocating() would never return true. + int total = 0; + for (StackSlot s : freedSlots) { + total += target.sizeInBytes(s.getKind()); + } + int initialSpillSize = returnAddressSize() + calleeSaveAreaSize(); + if (total == spillSize - initialSpillSize) { + // reset spill area size + spillSize = initialSpillSize; + } + freedSlots = null; + } frameSize = currentFrameSize(); }