diff --git a/basis/compiler/cfg/builder/builder-docs.factor b/basis/compiler/cfg/builder/builder-docs.factor index 9f0671388b..6b1af135e2 100644 --- a/basis/compiler/cfg/builder/builder-docs.factor +++ b/basis/compiler/cfg/builder/builder-docs.factor @@ -1,6 +1,6 @@ USING: assocs compiler.cfg compiler.cfg.builder.blocks compiler.cfg.stacks.local compiler.tree help.markup help.syntax literals math -multiline sequences words ; +multiline sequences vectors words ; IN: compiler.cfg.builder << @@ -42,7 +42,7 @@ H{ >> HELP: procedures -{ $var-description "Used as a temporary storage for the current cfg during construction of all cfgs." } ; +{ $var-description "A " { $link vector } " used as temporary storage during cfg construction for all procedures being built." } ; HELP: make-input-map { $values { "#shuffle" #shuffle } { "assoc" assoc } } diff --git a/basis/compiler/cfg/stacks/height/height-docs.factor b/basis/compiler/cfg/stacks/height/height-docs.factor index 59f53706b6..4cf18c7cce 100644 --- a/basis/compiler/cfg/stacks/height/height-docs.factor +++ b/basis/compiler/cfg/stacks/height/height-docs.factor @@ -3,7 +3,7 @@ IN: compiler.cfg.stacks.height HELP: record-stack-heights { $values { "ds-height" number } { "rs-height" number } { "bb" basic-block } } -{ $description "Does something." } ; +{ $description "Sets the data and retain stack heights in relation to the cfg of this basic block." } ; HELP: ds-heights { $var-description "Assoc that records the data stacks height at the entry of each " { $link basic-block } "." } ; diff --git a/basis/compiler/cfg/stacks/local/local-docs.factor b/basis/compiler/cfg/stacks/local/local-docs.factor index c24da16e78..1821162f5a 100644 --- a/basis/compiler/cfg/stacks/local/local-docs.factor +++ b/basis/compiler/cfg/stacks/local/local-docs.factor @@ -31,3 +31,14 @@ HELP: emit-height-changes "{ T{ ##inc-d { n 4 } } T{ ##inc-r { n -2 } } }" } } ; + +ARTICLE: "compiler.cfg.stacks.local" "Local stack analysis" +"Local stack analysis. We build three sets for every basic block in the CFG:" +{ $list + "peek-set: all stack locations that the block reads before writing" + "replace-set: all stack locations that the block writes" + "kill-set: all stack locations which become unavailable after the block ends because of the stack height being decremented" } +"This is done while constructing the CFG." ; + + +ABOUT: "compiler.cfg.stacks.local" diff --git a/basis/compiler/cfg/stacks/local/local.factor b/basis/compiler/cfg/stacks/local/local.factor index 1046fd8a9e..5488c263c8 100644 --- a/basis/compiler/cfg/stacks/local/local.factor +++ b/basis/compiler/cfg/stacks/local/local.factor @@ -7,14 +7,6 @@ math math.order namespaces sequences sets ; FROM: namespaces => set ; IN: compiler.cfg.stacks.local -! Local stack analysis. We build three sets for every basic block -! in the CFG: -! - peek-set: all stack locations that the block reads before writing -! - replace-set: all stack locations that the block writes -! - kill-set: all stack locations which become unavailable after the -! block ends because of the stack height being decremented -! This is done while constructing the CFG. - SYMBOLS: peek-sets replace-sets kill-sets ; SYMBOL: locs>vregs diff --git a/basis/compiler/cfg/stacks/stacks-docs.factor b/basis/compiler/cfg/stacks/stacks-docs.factor index 9baf0de036..5a304c6d8b 100644 --- a/basis/compiler/cfg/stacks/stacks-docs.factor +++ b/basis/compiler/cfg/stacks/stacks-docs.factor @@ -1,6 +1,11 @@ -USING: compiler.cfg.stacks.local help.markup help.syntax math sequences ; +USING: compiler.cfg.stacks.local compiler.tree help.markup help.syntax math +sequences ; IN: compiler.cfg.stacks +HELP: ds-push +{ $values { "vreg" "a virtual register" } } +{ $description "Used when translating the " { $link #push } " SSA node to CFG form for pushing a literal value onto the data stack." } ; + HELP: begin-stack-analysis { $description "Initializes a set of variables related to stack analysis of Factor words." } { $see-also current-height } ;