compiler.cfg.stacks: a few unused words removed
parent
09238cee4b
commit
c360f0123b
|
@ -1,5 +1,5 @@
|
||||||
USING: compiler.cfg.stacks.local compiler.tree help.markup help.syntax math
|
USING: compiler.cfg.instructions compiler.cfg.stacks.local compiler.tree
|
||||||
sequences ;
|
help.markup help.syntax math sequences ;
|
||||||
IN: compiler.cfg.stacks
|
IN: compiler.cfg.stacks
|
||||||
|
|
||||||
HELP: ds-push
|
HELP: ds-push
|
||||||
|
@ -15,14 +15,14 @@ HELP: end-stack-analysis
|
||||||
|
|
||||||
HELP: adjust-d
|
HELP: adjust-d
|
||||||
{ $values { "n" number } }
|
{ $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
|
HELP: ds-drop
|
||||||
{ $description "Used to signal to the stack analysis that the datastacks height is decreased by one." } ;
|
{ $description "Used to signal to the stack analysis that the datastacks height is decreased by one." } ;
|
||||||
|
|
||||||
HELP: ds-store
|
HELP: ds-store
|
||||||
{ $values { "vregs" "a " { $link sequence } " of vregs." } }
|
{ $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
|
HELP: rs-store
|
||||||
{ $values { "vregs" "a " { $link sequence } " of vregs." } }
|
{ $values { "vregs" "a " { $link sequence } " of vregs." } }
|
||||||
|
|
|
@ -46,13 +46,6 @@ IN: compiler.cfg.stacks
|
||||||
[ [ <ds-loc> replace-loc ] each-index ] bi
|
[ [ <ds-loc> replace-loc ] each-index ] bi
|
||||||
] unless-empty ;
|
] 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 -- )
|
: rs-store ( vregs -- )
|
||||||
[
|
[
|
||||||
<reversed>
|
<reversed>
|
||||||
|
@ -78,8 +71,4 @@ IN: compiler.cfg.stacks
|
||||||
: unary-op ( quot -- )
|
: unary-op ( quot -- )
|
||||||
[ ds-pop ] dip call ds-push ; inline
|
[ 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-d ( n -- ) current-height get [ + ] change-d drop ;
|
||||||
: adjust-r ( n -- ) current-height get [ + ] change-r drop ;
|
|
||||||
|
|
Loading…
Reference in New Issue