]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/stack-frame/stack-frame-docs.factor
349cd3e420657c847e2629b7ea9946ab527767b0
[factor.git] / basis / compiler / cfg / stack-frame / stack-frame-docs.factor
1 USING: compiler.cfg.instructions cpu.x86 help.markup help.syntax layouts math ;
2 IN: compiler.cfg.stack-frame
3
4 HELP: stack-frame
5 { $class-description "Counts in bytes of the various sizes of the blocks of the stack frame. The stack frame is organized in the following fashion, from bottom to top:"
6   { $list
7     "Parameter space: space for parameters to FFI functions "
8     "Allocation area: space for local allocations."
9     "Spill area: space for register spills."
10     { "Reserved stack space: only applicable on Windows x86.64. See " { $link reserved-stack-space } "." }
11     { "One final " { $link cell } " of padding." }
12   }
13   "The stack frame is also aligned to a 16 byte boundary. It has the following slots:"
14   { $table
15     { { $slot "total-size" } { "Total size of the stack frame." } }
16     { { $slot "params" } { "Reserved parameter space." } }
17     { { $slot "allot-area-base" } { "Base offset of the allocation area." } }
18     { { $slot "allot-area-size" } { "Number of bytes requires for the allocation area." } }
19     { { $slot "allot-area-align" } { "This slot is always at least " { $link cell } " bytes." } }
20     { { $slot "spill-area-base" } { "Base offset for the spill area." } }
21     { { $slot "spill-area-size" } { "Number of bytes requires for all spill slots." } }
22     { { $slot "spill-area-align" } { "This slot is always at least " { $link cell } " bytes." } }
23   }
24 }
25 { $see-also align-stack } ;
26
27 HELP: (stack-frame-size)
28 { $values { "stack-frame" stack-frame } { "n" integer } }
29 { $description "Base stack frame size, without padding and alignment. If the size is zero, then no " { $link ##epilogue } " and " { $link ##prologue } " needs to be emitted for the word." } ;
30
31 ARTICLE: "compiler.cfg.stack-frame" "Stack frames"
32 "This vocab contains definitions for constructing stack frames." ;
33
34 ABOUT: "compiler.cfg.stack-frame"