compiler.*: more docs

db4
Björn Lindqvist 2016-02-28 01:01:38 +01:00
parent 57c01ce863
commit 5663d39a76
6 changed files with 17 additions and 7 deletions

View 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." } ;

View 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." ;

View 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

View 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." } ;

View 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 } "." } ;

View 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* ;