]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.*: more docs
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 28 Feb 2016 00:01:38 +0000 (01:01 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Sun, 28 Feb 2016 00:01:38 +0000 (01:01 +0100)
basis/compiler/cfg/linear-scan/assignment/assignment-docs.factor
basis/compiler/cfg/stacks/finalize/finalize-docs.factor
basis/compiler/cfg/stacks/finalize/finalize.factor
basis/compiler/tree/debugger/debugger-docs.factor
basis/compiler/tree/propagation/call-effect/call-effect-docs.factor
basis/compiler/tree/propagation/call-effect/call-effect.factor

index 6a1f748002de5dc81b848690c31256ee817a7542..3aa52191608b77d7dbe30435584e8d05d51d15eb 100644 (file)
@@ -43,7 +43,7 @@ HELP: machine-edge-live-ins
 { $var-description "Mapping from basic blocks to predecessors to values which are live on a particular incoming edge." } ;
 
 HELP: machine-live-ins
-{ $var-description "Mapping from basic blocks to values which are live at the start on all incoming CFG edges. It's like " { $link live-ins } " except the registers are physical instead of virtual." } ;
+{ $var-description "Mapping from basic blocks to values which are live at the start on all incoming CFG edges. Each value is a sequence of 2-tuples where the first element is the vreg and the second the register or " { $link spill-slot } " which contains its value. It's like " { $link live-ins } " except the registers are physical instead of virtual." } ;
 
 HELP: machine-live-outs
 { $var-description "Mapping from " { $link basic-block } " to an " { $link assoc } " of pairs which are the values that are live at the end. The keys of the pairs are virtual registers and the values are either real registers or spill slots." } ;
index 77d8606aa4f63b6d5d0cea9cea0b4b1bc0d9ebc3..31a688a225285dcd02c56cc770ef63646b3fa9f4 100644 (file)
@@ -22,6 +22,10 @@ HELP: finalize-stack-shuffling
 { $values { "cfg" cfg } }
 { $description "Called to end the stack analysis." } ;
 
+HELP: visit-edge
+{ $values { "from" basic-block } { "to" basic-block } }
+{ $description "If both blocks are subroutine calls, don't bother computing anything." } ;
+
 ARTICLE: "compiler.cfg.stacks.finalize" "Stack finalization"
 "This pass inserts peeks and replaces." ;
 
index 210c9787729db95cf38b6dd5af1dcd1596a40c4c..d1ef80de68a410fb33377fd6fb9d00b5adb0359d 100644 (file)
@@ -31,8 +31,6 @@ ERROR: bad-peek dst loc ;
     [ dup n>> 0 < [ 2drop ] [ ##replace, ] if ] each-insertion ;
 
 : visit-edge ( from to -- )
-    ! If both blocks are subroutine calls, don't bother
-    ! computing anything.
     2dup [ kill-block?>> ] both? [ 2drop ] [
         2dup [ [ insert-replaces ] [ insert-peeks ] 2bi ##branch, ] V{ } make
         insert-basic-block
index fd9d38a656b4d0e1dfa005a08d1e87af5e850247..bf072a1e51eefcb4bb68594f6b67bf1a48c5bac3 100644 (file)
@@ -1,6 +1,12 @@
 USING: compiler.tree help.markup help.syntax kernel ;
 IN: compiler.tree.debugger
 
+HELP: >R
+{ $description "Symbol in the debugger to show that the top datastack item is moved to the retainstack." } ;
+
+HELP: R>
+{ $description "Symbol in the debugger to show that the top retainstack item os moved to the datastack." } ;
+
 HELP: #>r?
 { $values { "#shuffle" #shuffle } { "?" boolean } }
 { $description "True if the #shuffle copies an item from the data stack to the retain stack." } ;
index aaab9b598a6cf9867baa0b38c5141b944a95e71d..8e250f28c2daa69b0acb5879420fe1f06cc6855e 100644 (file)
@@ -1,5 +1,5 @@
-USING: combinators.private compiler.units effects help.markup help.syntax
-kernel quotations words ;
+USING: combinators.private compiler.units debugger effects help.markup
+help.syntax kernel quotations words ;
 IN: compiler.tree.propagation.call-effect
 
 HELP: already-inlined-quot?
@@ -26,6 +26,10 @@ HELP: call-effect-unsafe?
 { $values { "quot" quotation } { "effect" effect } { "?" boolean } }
 { $description "Checks if the given effect is safe with regards to the quotation." } ;
 
+HELP: safe-infer
+{ $values { "quot" quotation } { "effect" effect } }
+{ $description "Save and restore error variables here, so that we don't pollute words such as " { $link :error } " and " { $link :c } " for the user." } ;
+
 HELP: update-inline-cache
 { $values { "word/quot" { $or word quotation } } { "ic" inline-cache } }
 { $description "Sets the inline caches " { $slot "value" } " to the given word/quot and updates its " { $slot "counter" } " to the value of the " { $link effect-counter } "." } ;
index 361bb012867334eefd5c0b32b0258ee6d9999699..edb5ce76bae4cef9f0cc0ad0d038409ebcd78403 100644 (file)
@@ -41,8 +41,6 @@ M: compose cached-effect
     [ first>> ] [ second>> ] bi [ cached-effect ] bi@ compose-effects* ;
 
 : safe-infer ( quot -- effect )
-    ! Save and restore error variables here, so that we don't
-    ! pollute words such as :error and :c for the user.
     error get-global error-continuation get-global
     [ [ [ infer ] [ 2drop +unknown+ ] recover ] without-dependencies ] 2dip
     [ error set-global ] [ error-continuation set-global ] bi* ;