]> gitweb.factorcode.org Git - factor.git/commitdiff
stack-checker.*: doc updates
authorBjörn Lindqvist <bjourne@gmail.com>
Thu, 1 Sep 2016 00:24:54 +0000 (02:24 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Thu, 1 Sep 2016 00:24:54 +0000 (02:24 +0200)
basis/stack-checker/alien/alien-docs.factor
basis/stack-checker/backend/backend-docs.factor
basis/stack-checker/state/state-docs.factor
basis/stack-checker/visitor/visitor-docs.factor

index fd605778b2b764b931170022f6436215c8b96f0a..29b711fc65e0572b270d4f54823c29fa2ba0a1b1 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien alien.c-types compiler.tree effects help.markup help.syntax
+USING: alien alien.c-types compiler.tree help.markup help.syntax
 quotations sequences ;
 IN: stack-checker.alien
 
@@ -38,6 +38,9 @@ HELP: callback-parameter-quot
   }
 } ;
 
+HELP: infer-alien-assembly
+{ $description "Infers " { $link alien-assembly } " calls." } ;
+
 HELP: infer-alien-invoke
 { $description "Appends the necessary SSA nodes for performing an " { $link alien-invoke } " call to the IR tree being constructed." } ;
 
@@ -61,3 +64,13 @@ HELP: wrap-callback-quot
     "]"
   }
 } ;
+
+ARTICLE: "stack-checker.alien" "Inferring alien words" "This vocab contains code for inferring the words that form part of the alien FFI: " { $link alien-invoke } ", " { $link alien-indirect } ", " { $link alien-assembly } " and " { $link alien-callback } ". The words performing the inferring are:"
+{ $subsections
+  infer-alien-invoke
+  infer-alien-indirect
+  infer-alien-assembly
+  infer-alien-callback
+} ;
+
+ABOUT: "stack-checker.alien"
index c2344f58d11972aa92a3f9df4f7791d258a9e8ca..8dad8772a15619f21e8b6f08bb0437f35164e935 100644 (file)
@@ -63,3 +63,17 @@ HELP: required-stack-effect
 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." } ;
+
+ARTICLE: "stack-checker.backend" "Stack effect inference implementation"
+"Contains words for manipulating the compile-time data and retainstacks:"
+{ $subsections
+  peek-d
+  pop-d
+  pop-literal
+  pop-r
+  push-d
+  push-literal
+  push-r
+} ;
+
+ABOUT: "stack-checker.backend"
index ea27e6fa4da47a9e156866feb1c0a4424333d8f1..f76a031acdcee0e1aba756b4b4f542fb4ac3eade 100644 (file)
@@ -1,7 +1,13 @@
-USING: compiler.tree effects help.markup help.syntax quotations sequences
-stack-checker.values stack-checker.visitor ;
+USING: compiler.tree effects help.markup help.syntax sequences
+stack-checker.backend stack-checker.values stack-checker.visitor ;
 IN: stack-checker.state
 
+HELP: (meta-d)
+{ $var-description "Compile-time datastack." } ;
+
+HELP: (meta-r)
+{ $var-description "Compile-time retainstack." } ;
+
 HELP: terminated?
 { $var-description "Did the current control-flow path throw an error?" } ;
 
@@ -19,10 +25,10 @@ HELP: current-effect
 
 HELP: commit-literals
 { $description "Outputs all remaining literals to the current " { $link stack-visitor } " as " { $link #push } " instructions. They are also pushed onto the compile-time data stack." }
-{ $see-also meta-d } ;
+{ $see-also meta-d literals } ;
 
 HELP: input-count
-{ $var-description "Number of inputs current word expects from the stack." } ;
+{ $var-description "Number of inputs current word expects from the stack. The value is set by the word " { $link introduce-values } "." } ;
 
 HELP: meta-d
 { $values { "stack" sequence } }
@@ -38,3 +44,8 @@ HELP: literals
 HELP: (push-literal)
 { $values { "obj" "a literal" } }
 { $description "Pushes a literal value to the end of the current " { $link stack-visitor } ". The literal is also given a number and registered in the assoc of " { $link known-values } "." } ;
+
+ARTICLE: "stack-checker.state" "Variables for holding stack effect inference state" "Variables for holding stack effect inference state. Access to the compile-time stacks:"
+{ $subsections meta-d meta-r } ;
+
+ABOUT: "stack-checker.state"
index 6713feeb62306006b5d28fcdd20a21facfd2d331..68a5a33c8fc894421c2502179283e079f835f13d 100644 (file)
@@ -1,6 +1,10 @@
-USING: compiler.tree help.markup help.syntax kernel sequences words ;
+USING: compiler.tree help.markup help.syntax kernel sequences vectors
+;
 IN: stack-checker.visitor
 
+HELP: stack-visitor
+{ $var-description { $link vector } " that collects tree nodes when the SSA tree is built." } ;
+
 HELP: #>r,
 { $values { "inputs" sequence } { "outputs" sequence } }
 { $description "Emits a " { $link #shuffle } " node that copies values from the data stack to the retain stack. This node is primarily outputted by the " { $link dip } " word and its relatives." }