]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.*: more compiler docs
authorBjörn Lindqvist <bjourne@gmail.com>
Thu, 18 Dec 2014 16:38:09 +0000 (17:38 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 31 Dec 2014 02:37:16 +0000 (03:37 +0100)
basis/compiler/cfg/builder/builder-docs.factor
basis/compiler/cfg/stacks/height/height-docs.factor
basis/compiler/cfg/stacks/local/local-docs.factor
basis/compiler/cfg/stacks/local/local.factor
basis/compiler/cfg/stacks/stacks-docs.factor

index 9f0671388bf753e0569efcbbf711fa5758e6c6fc..6b1af135e22efb77602fc7bb7f45e33d7a2e839f 100644 (file)
@@ -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 } }
index 59f53706b67b382d83b11e3b6ffeb3ae880ed480..4cf18c7ccedf67b2152d0df178572dd23d6e0a5a 100644 (file)
@@ -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 } "." } ;
index c24da16e78668210f01a2b3073d3af2df59f03de..1821162f5a7d0fdc15159c13c68a957e1b8a1045 100644 (file)
@@ -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"
index 1046fd8a9eee2b9b575602dd2e99f9b99241854b..5488c263c851f11e1c9eb6c2fdc368258114163e 100644 (file)
@@ -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
index 9baf0de0368c09e358e54e815aff54f467e0ad60..5a304c6d8b44ba612f8c508b355166dd12db5631 100644 (file)
@@ -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 } ;