Changes between Version 22 and Version 23 of Commentary/Compiler/StackAreas
- Timestamp:
- 06/06/08 08:38:16 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/StackAreas
v22 v23 78 78 }}} 79 79 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.80 An {{{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. 81 81 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}}}. 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}}}. If the {{{Area}}} is a {{{RegSlot}}}, it is a dynamic invariant that the offset must be {{{0}}}. 83 83 84 84 Note: 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.
