compiler.cfg.*: more docstrings for compiler words
parent
c6784020aa
commit
c3253406e3
|
@ -0,0 +1,6 @@
|
|||
USING: compiler.cfg help.markup help.syntax ;
|
||||
IN: compiler.cfg.block-joining
|
||||
|
||||
HELP: join-block?
|
||||
{ $values { "bb" basic-block } { "?" "a boolean" } }
|
||||
{ $description "Whether the block can be joined with its predecessor or not." } ;
|
|
@ -1,6 +1,33 @@
|
|||
USING: compiler.cfg help.markup help.syntax ;
|
||||
USING: classes compiler.cfg help.markup help.syntax sequences ;
|
||||
IN: compiler.cfg.dataflow-analysis
|
||||
|
||||
HELP: predecessors
|
||||
{ $values { "bb" basic-block } { "dfa" "a dataflow analysis symbol" } { "seq" sequence } }
|
||||
{ $description "Generic word that returns the predecessors for a block. It's purpose is to facilitate backward analysis in which the blocks successors are seen as the predecessors." } ;
|
||||
|
||||
HELP: successors
|
||||
{ $values { "bb" basic-block } { "dfa" "a dataflow analysis symbol" } { "seq" sequence } }
|
||||
{ $description "Generic word that returns the successors for a block. It's purpose is to facilitate backward analysis in which the blocks predecessors are seen as the successors." } ;
|
||||
|
||||
HELP: transfer-set
|
||||
{ $values
|
||||
{ "in-set" "input state" }
|
||||
{ "bb" basic-block }
|
||||
{ "dfa" class }
|
||||
{ "out-set" "output state" }
|
||||
}
|
||||
{ $description "Generic word which is called during the dataflow analysis to process each basic block in the cfg. It is supposed to be implemented by all forward and backward dataflow analysis subclasses to perform analysis." } ;
|
||||
|
||||
HELP: join-sets
|
||||
{ $values
|
||||
{ "sets" "input states" }
|
||||
{ "bb" basic-block }
|
||||
{ "dfa" class }
|
||||
{ "set" "merged state" }
|
||||
}
|
||||
{ $description "Generic word which merges multiple states into one. A block in the cfg might have multiple predecessors and then this word is used to compute the merged input state to use to analyze the block." } ;
|
||||
|
||||
|
||||
<PRIVATE
|
||||
|
||||
HELP: run-dataflow-analysis
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
USING: compiler.cfg compiler.cfg.linearization compiler.codegen help.markup
|
||||
help.syntax kernel macros sequences ;
|
||||
help.syntax kernel macros math sequences ;
|
||||
IN: compiler.cfg.linearization
|
||||
|
||||
HELP: linearization-order
|
||||
|
@ -9,3 +9,11 @@ HELP: linearization-order
|
|||
}
|
||||
{ $description "Lists the basic blocks in linearization order. That is, the order in which they will be written in the generated assembly code." }
|
||||
{ $see-also generate } ;
|
||||
|
||||
HELP: block-number
|
||||
{ $values { "bb" basic-block } { "n" integer } }
|
||||
{ $description "Retrieves this blocks block number. Must not be called before " { $link number-blocks } "." } ;
|
||||
|
||||
HELP: number-blocks
|
||||
{ $values { "bbs" sequence } }
|
||||
{ $description "Associate each block with a block number and save the result in the " { $link numbers } " map." } ;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
USING: compiler.cfg help.markup help.syntax kernel ;
|
||||
IN: compiler.cfg.predecessors
|
||||
|
||||
HELP: needs-predecessors
|
||||
{ $values { "cfg" cfg } { "cfg'" cfg } }
|
||||
{ $description "Computes predecessor info for the cfg unless it already is up-to-date." } ;
|
Loading…
Reference in New Issue