# HG changeset patch # User Josef Eisl # Date 1416409441 -3600 # Node ID eeed42f7e38c2c7bf07f33144f2eb25ece12e219 # Parent 3d0161947d57168accf57821d6c1697b135d2996 Assert assumptions about the deoptimization rescue slot. diff -r 3d0161947d57 -r eeed42f7e38c graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java Tue Nov 18 11:21:07 2014 +0100 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java Wed Nov 19 16:04:01 2014 +0100 @@ -36,7 +36,7 @@ * *
  *   Base       Contents
- *
+ * 
  *            :                                :  -----
  *   caller   | incoming overflow argument n   |    ^
  *   frame    :     ...                        :    | positive
@@ -111,7 +111,7 @@
      * runtime for walking/inspecting frames of such methods.
      */
     StackSlot allocateRBPSpillSlot() {
-        assert spillSize == initialSpillSize : "RBP spill slot can only be allocated before getting other stack slots";
+        assert spillSize == initialSpillSize : "RBP spill slot must be the first allocated stack slots";
         rbpSpillSlot = allocateSpillSlot(LIRKind.value(Kind.Long));
         assert asStackSlot(rbpSpillSlot).getRawOffset() == -16 : asStackSlot(rbpSpillSlot).getRawOffset();
         return rbpSpillSlot;
@@ -124,6 +124,7 @@
     }
 
     public StackSlot allocateDeoptimizationRescueSlot() {
+        assert spillSize == initialSpillSize || spillSize == initialSpillSize + spillSlotSize(LIRKind.value(Kind.Long)) : "Deoptimization rescue slot must be the first or second (if there is an RBP spill slot) stack slot";
         return allocateSpillSlot(LIRKind.value(Kind.Long));
     }
 }