Merged revisions 7797-7917 via svnmerge from
[cacao.git] / doc / stack.txt
index 15b649ce713eba2bccc1eebf2554e2a3e9ca9cf7..603b87556e8a7a40b3c6590cd11cc87e7b5a5756 100644 (file)
@@ -42,12 +42,18 @@ The following invariants hold at all time for the stack representation:
     6) References can only go to lower memory addresses. That is, for each stack slot sp:
 
             (sp->prev == NULL) or (sp->prev < sp)
+    7) If an instruction produces any stackslots, iptr->dst points to the highest-address 
+       stackslot produced
+       Corollary: if iptr->dst points to curstack or below, the instruction does
+                   not produce any stackslots
+
 
     ATTENTION: The instack of a block and the slots produced within the block
                are *not* guaranteed to be adjacent (see figure below)!
 
     ATTENTION: not every stack slot that is allocated may be reachable
-               by following the pointer in basicblock or instruction!
+               by following the pointers in basicblock or the instructions!
 
                NOTE: This is a problem. As far as I know it is only the case
                      for IINC, which produces a dummy stack slot. We should