compiler.cfg: fix some docs.

db4
John Benediktsson 2014-06-08 18:20:27 -07:00
parent d02b399f70
commit bf473ec943
6 changed files with 7 additions and 7 deletions

View File

@ -7,6 +7,7 @@ HELP: box
{ "vregs" "a one-element sequence containing a virtual register indentifier" }
{ "reps" "a one-element sequence containing a representation symbol" }
{ "c-type" c-type }
{ "dst" "box" }
}
{ $description "Emits a " { $link ##box-alien } " instruction which boxes an alien value contained in the given register." }
{ $examples

View File

@ -15,7 +15,7 @@ HELP: call-height
{ $description "Calculates how many items a " { $link #call } " will add or remove from the data stack." }
{ $examples
{ $example
"USING: compiler.cfg.builder.blocks prettyprint ;"
"USING: compiler.cfg.builder.blocks compiler.tree.builder prettyprint sequences ;"
"[ 3append ] build-tree second call-height ."
"-2"
}

View File

@ -44,11 +44,10 @@ HELP: procedures
{ $var-description "Used as a temporary storage for the current cfg during construction of all cfgs." } ;
HELP: make-input-map
{ $values { "#call" #call } { "assoc" assoc } }
{ $values { "#shuffle" #shuffle } { "assoc" assoc } }
{ $description "Creates an " { $link assoc } " that maps input values to the shuffle operation to stack locations." }
{ $examples { $unchecked-example $[ ex-make-input-map ] } } ;
HELP: emit-call
{ $values { "word" word } { "height" number } }
{ $description "Emits a call to the given word to the " { $link cfg } " being constructed. \"height\" is the number of items being added to or removed from the data stack. Side effects of the word is that it modifies the \"basic-block\" and " { $link current-height } " variables." }
@ -71,7 +70,7 @@ HELP: trivial-branch?
{ $description "Checks whether nodes is a trivial branch or not. The branch is counted as trivial if all it does is push a literal value on the stack." }
{ $examples
{ $example
"USING: compiler.cfg.builder prettyprint ;"
"USING: compiler.cfg.builder compiler.tree prettyprint ;"
"{ T{ #push { literal 25 } } } trivial-branch? . ."
"t\n25"
}

View File

@ -5,7 +5,7 @@ IN: compiler.cfg.linearization
HELP: linearization-order
{ $values
{ "cfg" cfg }
{ "bb" sequence }
{ "bbs" sequence }
}
{ $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 } ;

View File

@ -6,7 +6,7 @@ HELP: number-blocks
{ $description "Initializes the " { $slot "number" } " slot of each " { $link basic-block } "." }
{ $examples
{ $example
"USING: compiler.cfg compiler.cfg.rpo prettyprint ;"
"USING: accessors compiler.cfg compiler.cfg.rpo kernel prettyprint sequences ;"
"10 [ <basic-block> ] replicate dup number-blocks [ number>> ] map ."
"{ 9 8 7 6 5 4 3 2 1 0 }"
}

View File

@ -9,7 +9,7 @@ HELP: translate-local-loc
{ $description "Translates an absolute stack location to one that is relative to the current stacks height as given in " { $link current-height } "." }
{ $examples
{ $example
"USING: compiler.cfg.stacks.local prettyprint ;"
"USING: compiler.cfg.stacks.local compiler.cfg.registers namespaces prettyprint ;"
"T{ current-height { d 3 } } current-height set D 7 translate-local-loc ."
"D 4"
}