Docs: documentation for stack-checker.* and compiler.* vocabs

db4
Björn Lindqvist 2014-05-16 18:15:14 +02:00 committed by John Benediktsson
parent 93a609db38
commit 395a490b90
6 changed files with 53 additions and 6 deletions

View File

@ -1,5 +1,5 @@
USING: compiler.cfg compiler.cfg.instructions help.markup help.syntax vectors
words ;
USING: compiler.cfg compiler.cfg.instructions help.markup help.syntax
namespaces vectors words ;
IN: compiler.cfg
HELP: basic-block
@ -13,7 +13,7 @@ HELP: basic-block
HELP: <basic-block>
{ $values { "bb" basic-block } }
{ $description "Creates a new empty basic block." } ;
{ $description "Creates a new empty basic block. The " { $slot "id" } " slot is initialized with the value of the basic-block " { $link counter } "." } ;
HELP: cfg
{ $class-description

View File

@ -1,9 +1,20 @@
USING: compiler.cfg help.markup help.syntax ;
USING: compiler.cfg compiler.cfg.registers help.markup help.syntax ;
IN: compiler.cfg.stacks.local
HELP: current-height
{ $class-description "A tuple used to keep track of the heights of the data and retain stacks in a " { $link basic-block } "." } ;
HELP: translate-local-loc
{ $values { "loc" loc } { "loc'" 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 ;"
"T{ current-height { d 3 } } current-height set D 7 translate-local-loc ."
"D 4"
}
} ;
HELP: emit-height-changes
{ $description "Emits stack height change instructions to the CFG being built." }
{ $examples

View File

@ -1,7 +1,17 @@
USING: compiler.codegen.labels cpu.architecture help.markup help.syntax make
strings ;
USING: byte-vectors compiler.codegen.labels compiler.constants cpu.architecture
help.markup help.syntax make strings ;
IN: compiler.codegen.relocation
HELP: relocation-table
{ $description "A " { $link byte-vector } " holding the relocations for the current compilation. Each sequence of four bytes in the vector represents one relocation." } ;
HELP: add-relocation
{ $values
{ "class" "a relocation class such as " { $link rc-relative } }
{ "type" "a relocation type such as " { $link rt-safepoint } }
}
{ $description "Adds one relocation to the relocation table." } ;
HELP: add-literal
{ $values { "obj" "a symbol" } }
{ $description "Adds a symbol to the " { $link literal-table } "." } ;

View File

@ -0,0 +1,5 @@
USING: alien effects help.markup help.syntax ;
IN: stack-checker.alien
HELP: infer-alien-invoke
{ $description "Appends the necessary SSA nodes for performing an " { $link alien-invoke } " call to the IR tree being constructed." } ;

View File

@ -0,0 +1,15 @@
USING: compiler.tree effects help.markup help.syntax quotations sequences
stack-checker.visitor ;
IN: stack-checker.backend
HELP: infer-quot-here
{ $values { "quot" quotation } }
{ $description "Performs inferencing on the given quotation. This word should only be called in a " { $link with-infer } " context." } ;
HELP: introduce-values
{ $values { "values" sequence } }
{ $description "Emits an " { $link #introduce } " node to the current " { $link stack-visitor } " which pushes the given values onto the data stack." } ;
HELP: with-infer
{ $values { "quot" quotation } { "effect" effect } { "visitor" "a visitor, if any" } }
{ $description "Initializes the inference engine and then runs the given quotation which is supposed to perform the inferencing." } ;

View File

@ -0,0 +1,6 @@
USING: help.markup help.syntax sequences words ;
IN: stack-checker.known-words
HELP: define-primitive
{ $values { "word" word } { "inputs" sequence } { "outputs" sequence } }
{ $description "Marks the word as a primitive whose input and output types must be the given ones." } ;