diff --git a/basis/compiler/cfg/stacks/stacks-docs.factor b/basis/compiler/cfg/stacks/stacks-docs.factor index 11d59721a8..3f04fbfc2a 100644 --- a/basis/compiler/cfg/stacks/stacks-docs.factor +++ b/basis/compiler/cfg/stacks/stacks-docs.factor @@ -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." } } diff --git a/basis/compiler/cfg/stacks/stacks.factor b/basis/compiler/cfg/stacks/stacks.factor index cc43014b77..56adf1894e 100644 --- a/basis/compiler/cfg/stacks/stacks.factor +++ b/basis/compiler/cfg/stacks/stacks.factor @@ -46,13 +46,6 @@ IN: compiler.cfg.stacks [ [ replace-loc ] each-index ] bi ] unless-empty ; -: rs-drop ( -- ) -1 inc-r ; - -: rs-load ( n -- vregs ) - dup 0 = - [ drop f ] - [ [ [ peek-loc ] map ] [ neg inc-r ] bi ] if ; - : rs-store ( vregs -- ) [ @@ -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 ;