Mercurial > hg > truffle
changeset 8304:02a3fd8a8308
fixed issue preventing frame omission
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 15 Mar 2013 18:50:39 +0100 |
parents | bb9fba66b6ef |
children | 338b0d2382b3 |
files | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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(); }