]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.stacks: a few unused words removed
authorBjörn Lindqvist <bjourne@gmail.com>
Fri, 13 Mar 2015 13:07:29 +0000 (13:07 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 29 Apr 2015 16:31:54 +0000 (09:31 -0700)
basis/compiler/cfg/stacks/stacks-docs.factor
basis/compiler/cfg/stacks/stacks.factor

index 11d59721a893ebda946528f53c8774a01bad10cb..3f04fbfc2ad727feeccf8598cdc472510bd6af2f 100644 (file)
@@ -1,5 +1,5 @@
-USING: compiler.cfg.stacks.local compiler.tree help.markup help.syntax math
-sequences ;
+USING: compiler.cfg.instructions compiler.cfg.stacks.local compiler.tree
+help.markup help.syntax math sequences ;
 IN: compiler.cfg.stacks
 
 HELP: ds-push
@@ -15,14 +15,14 @@ HELP: end-stack-analysis
 
 HELP: adjust-d
 { $values { "n" number } }
-{ $description "Changes the height of the current data stack." } ;
+{ $description "Changes the height of the current data stack. This word is called when other instructions which internally adjust the stack height are emitted, such as " { $link ##call } " and " { $link ##alien-invoke } "." } ;
 
 HELP: ds-drop
 { $description "Used to signal to the stack analysis that the datastacks height is decreased by one." } ;
 
 HELP: ds-store
 { $values { "vregs" "a " { $link sequence } " of vregs." } }
-{ $description "Registers that a sequence of vregs are stored at at each corresponding index of the data stack." } ;
+{ $description "Registers that a sequence of vregs are stored at at each corresponding index of the data stack. It is used for compiling " { $link #shuffle } " nodes." } ;
 
 HELP: rs-store
 { $values { "vregs" "a " { $link sequence } " of vregs." } }
index cc43014b7712daf7a756ab8f23b0b19ddfcad293..56adf1894efc6b3008cbdf04d74a4437e647c178 100644 (file)
@@ -46,13 +46,6 @@ IN: compiler.cfg.stacks
         [ [ <ds-loc> replace-loc ] each-index ] bi
     ] unless-empty ;
 
-: rs-drop ( -- ) -1 inc-r ;
-
-: rs-load ( n -- vregs )
-    dup 0 =
-    [ drop f ]
-    [ [ <reversed> [ <rs-loc> peek-loc ] map ] [ neg inc-r ] bi ] if ;
-
 : rs-store ( vregs -- )
     [
         <reversed>
@@ -78,8 +71,4 @@ IN: compiler.cfg.stacks
 : unary-op ( quot -- )
     [ ds-pop ] dip call ds-push ; inline
 
-! adjust-d/adjust-r: these are called when other instructions which
-! internally adjust the stack height are emitted, such as ##call and
-! ##alien-invoke
 : adjust-d ( n -- ) current-height get [ + ] change-d drop ;
-: adjust-r ( n -- ) current-height get [ + ] change-r drop ;