Changes between Version 39 and Version 40 of Commentary/Compiler/StackAreas


Ignore:
Timestamp:
Jun 26, 2008 12:55:51 PM (7 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StackAreas

    v39 v40  
    8282 
    8383To name a specific location on the stack, we represent its address with a new kind of {{{CmmExpr}}}: the {{{CmmStackSlot}}}. A {{{CmmStackSlot}}} is just an integer offset into an {{{Area}}}. If the {{{Area}}} is a {{{RegSlot}}}, it is a dynamic invariant that the offset must be {{{0}}}. 
     84 
     85Notice that a `CmmStackSlot` is an ''address'', so we can say 
     86{{{ 
     87  Sp = SS(a+0) 
     88}}} 
     89to make `Sp` point to an particular area.   Use a `CmmLoad` to load from the stack. 
     90 
     91'''More detail needed about which location in a `CallArea` is numbered 0''' 
    8492 
    8593Note: We don't have a virtual frame pointer in this story, but do we really want it? Here's a minor argument against: it requires special treatment by some analyses in Quick C-- (on the other hand, QC-- doesn't have distinguished global registers, so it might not even be an issue in GHC, which has many distinguished global registers).