Changes between Version 22 and Version 23 of Commentary/Compiler/StackAreas


Ignore:
Timestamp:
Jun 6, 2008 3:38:16 PM (6 years ago)
Author:
dias
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StackAreas

    v22 v23  
    7878}}} 
    7979 
    80 An {{{Area}}} represents space on the stack; it may contain either a single stack slot for a register or a number of parameters passed to/from a function call/return. The {{{BlockId}}} is the label of the function call's continuation, and the two integers are the sizes of the outgoing and incoming parameter-passing areas. 
     80An {{{Area}}} represents space on the stack; it may use either the {{{RegSlot}}} constructor to represent a single stack slot for a register or the {{{CallArea}}} constructor to represent parameters passed to/from a function call/return. In a {{{CallArea}}}, the {{{BlockId}}} is the label of the function call's continuation, and the two integers are the sizes of the outgoing and incoming parameter-passing areas. 
    8181 
    82 To 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}}}. 
     82To 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}}}. 
    8383 
    8484Note: We don't have a virtual frame pointer in this story, but do we really need it? Here's a minor argument against: it requires special treatment by some analyses in Quick C--, although it might just fold away into the large set of global registers in GHC.