compiler.cfg.stacks: a few unused words removed

db4
Björn Lindqvist 2015-03-13 13:07:29 +00:00 committed by John Benediktsson
parent 09238cee4b
commit c360f0123b
2 changed files with 4 additions and 15 deletions

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

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