From c6784020aa426d363ef8649fac2f5c35c4b773dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Tue, 29 Jul 2014 18:43:13 +0200 Subject: [PATCH] compiler.cfg.*: initial docs for dataflow analysis vocabs --- basis/compiler/cfg/cfg-docs.factor | 1 + .../dataflow-analysis-docs.factor | 25 +++++++++++++++++++ .../uninitialized/uninitialized-docs.factor | 6 +++++ 3 files changed, 32 insertions(+) create mode 100644 basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor create mode 100644 basis/compiler/cfg/stacks/uninitialized/uninitialized-docs.factor diff --git a/basis/compiler/cfg/cfg-docs.factor b/basis/compiler/cfg/cfg-docs.factor index 46712a6dcd..9413464ee2 100644 --- a/basis/compiler/cfg/cfg-docs.factor +++ b/basis/compiler/cfg/cfg-docs.factor @@ -10,6 +10,7 @@ HELP: basic-block { { $slot "successors" } { "A " { $link vector } " of basic blocks that may be executed directly after this block. Most blocks only have one successor but a block that checks where an if-condition should branch to would have two for example." } } { { $slot "predecessors" } { "The opposite of successors -- a " { $link vector } " of basic blocks from which the execution may have arrived into this block." } } { { $slot "instructions" } { "A " { $link vector } " of " { $link insn } " tuples which form the instructions of the basic block." } } + { { $slot "unlikely?" } { "Unused boolean slot." } } } } ; diff --git a/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor b/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor new file mode 100644 index 0000000000..645fb413ef --- /dev/null +++ b/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor @@ -0,0 +1,25 @@ +USING: compiler.cfg help.markup help.syntax ; +IN: compiler.cfg.dataflow-analysis + + + +HELP: FORWARD-ANALYSIS: +{ $syntax "FORWARD-ANALYSIS: word" } +{ $values { "word" "name of the compiler pass" } } +{ $description "Syntax word for defining a forward analysis compiler pass." } ; + +HELP: BACKWARD-ANALYSIS: +{ $syntax "BACKWARD-ANALYSIS: word" } +{ $values { "word" "name of the compiler pass" } } +{ $description "Syntax word for defining a backward analysis compiler pass." } ; diff --git a/basis/compiler/cfg/stacks/uninitialized/uninitialized-docs.factor b/basis/compiler/cfg/stacks/uninitialized/uninitialized-docs.factor new file mode 100644 index 0000000000..a39d4cfdc9 --- /dev/null +++ b/basis/compiler/cfg/stacks/uninitialized/uninitialized-docs.factor @@ -0,0 +1,6 @@ +USING: compiler.cfg compiler.cfg.instructions help.markup help.syntax ; +IN: compiler.cfg.stacks.uninitialized + +HELP: compute-uninitialized-sets +{ $values { "cfg" cfg } } +{ $description "Runs the uninitialized compiler pass. The pass serves two purposes; if a " { $link ##peek } " reads an uninitialized stack location, then an error is thrown. Second, it assigns the " { $slot "scrub-d" } " and " { $slot "scrub-r" } " slots of all " { $link gc-map } " instances in the cfg." } ;