From becaa7985d4f3e127d0b5e4d9702d3cce238dc3e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Jun 2009 16:38:39 -0500 Subject: [PATCH] Remove unused words discovered by Samuel Tardieu --- basis/functors/functors.factor | 2 -- basis/heaps/heaps.factor | 9 --------- basis/help/lint/lint.factor | 2 -- basis/opengl/textures/textures.factor | 3 --- basis/ui/baseline-alignment/baseline-alignment.factor | 3 --- basis/ui/gadgets/panes/panes.factor | 4 ---- basis/ui/gadgets/sliders/sliders.factor | 2 -- basis/unicode/breaks/breaks.factor | 6 ------ core/generic/math/math-docs.factor | 4 +--- core/generic/math/math.factor | 2 -- 10 files changed, 1 insertion(+), 36 deletions(-) diff --git a/basis/functors/functors.factor b/basis/functors/functors.factor index e5eb50e82f..b7dab0d6af 100644 --- a/basis/functors/functors.factor +++ b/basis/functors/functors.factor @@ -58,8 +58,6 @@ M: object (fake-quotations>) , ; [ parse-definition* ] dip parsed ; -: DEFINE* ( accum -- accum ) \ define-declared* parsed ; - SYNTAX: `TUPLE: scan-param parsed scan { diff --git a/basis/heaps/heaps.factor b/basis/heaps/heaps.factor index becfb6826d..ae546080a1 100644 --- a/basis/heaps/heaps.factor +++ b/basis/heaps/heaps.factor @@ -51,9 +51,6 @@ M: heap heap-size ( heap -- n ) : data-nth ( n heap -- entry ) data>> nth-unsafe ; inline -: up-value ( n heap -- entry ) - [ up ] dip data-nth ; inline - : left-value ( n heap -- entry ) [ left ] dip data-nth ; inline @@ -75,9 +72,6 @@ M: heap heap-size ( heap -- n ) : data-pop* ( heap -- ) data>> pop* ; inline -: data-peek ( heap -- entry ) - data>> last ; inline - : data-first ( heap -- entry ) data>> first ; inline @@ -130,9 +124,6 @@ DEFER: up-heap 2dup right-bounds-check? [ drop left ] [ (child) ] if ; -: swap-down ( m heap -- ) - [ child ] 2keep data-exchange ; - DEFER: down-heap : (down-heap) ( m heap -- ) diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index 4ead01159a..c1dd591013 100755 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -55,8 +55,6 @@ PRIVATE> ] check-something ] [ drop ] if ; -: check-words ( words -- ) [ check-word ] each ; - : check-article ( article -- ) [ with-interactive-vocabs ] vocabs-quot set >link dup '[ diff --git a/basis/opengl/textures/textures.factor b/basis/opengl/textures/textures.factor index d43e1736d1..2eabbd478b 100755 --- a/basis/opengl/textures/textures.factor +++ b/basis/opengl/textures/textures.factor @@ -135,9 +135,6 @@ TUPLE: multi-texture grid display-list loc disposed ; [ dup image-locs ] dip '[ [ _ v+ |dispose ] 2map ] 2map ; -: draw-textured-grid ( grid -- ) - [ [ [ dim>> ] keep (draw-textured-rect) ] each ] each ; - : grid-has-alpha? ( grid -- ? ) first first image>> has-alpha? ; diff --git a/basis/ui/baseline-alignment/baseline-alignment.factor b/basis/ui/baseline-alignment/baseline-alignment.factor index f7f7a757f5..6e2b58479b 100644 --- a/basis/ui/baseline-alignment/baseline-alignment.factor +++ b/basis/ui/baseline-alignment/baseline-alignment.factor @@ -36,9 +36,6 @@ TUPLE: gadget-metrics height ascent descent cap-height ; : max-descent ( seq -- n ) [ descent>> ] map ?supremum ; -: max-text-height ( seq -- y ) - [ ascent>> ] filter [ height>> ] map ?supremum ; - : max-graphics-height ( seq -- y ) [ ascent>> not ] filter [ height>> ] map ?supremum 0 or ; diff --git a/basis/ui/gadgets/panes/panes.factor b/basis/ui/gadgets/panes/panes.factor index eb741f13b6..2c5ed596ac 100644 --- a/basis/ui/gadgets/panes/panes.factor +++ b/basis/ui/gadgets/panes/panes.factor @@ -96,10 +96,6 @@ M: pane selected-children add-incremental ] [ next-line ] bi ; -: ?pane-nl ( pane -- ) - [ dup current>> children>> empty? [ pane-nl ] [ drop ] if ] - [ pane-nl ] bi ; - : smash-pane ( pane -- gadget ) [ pane-nl ] [ output>> smash-line ] bi ; : pane-write ( seq pane -- ) diff --git a/basis/ui/gadgets/sliders/sliders.factor b/basis/ui/gadgets/sliders/sliders.factor index 80829d7b66..d293fd7f8b 100644 --- a/basis/ui/gadgets/sliders/sliders.factor +++ b/basis/ui/gadgets/sliders/sliders.factor @@ -23,8 +23,6 @@ TUPLE: slider < track elevator thumb saved line ; TUPLE: elevator < gadget direction ; -: find-elevator ( gadget -- elevator/f ) [ elevator? ] find-parent ; - : find-slider ( gadget -- slider/f ) [ slider? ] find-parent ; CONSTANT: elevator-padding 4 diff --git a/basis/unicode/breaks/breaks.factor b/basis/unicode/breaks/breaks.factor index 1b1d9434f8..6d6b5cc0cf 100644 --- a/basis/unicode/breaks/breaks.factor +++ b/basis/unicode/breaks/breaks.factor @@ -72,9 +72,6 @@ SYMBOL: table : connect ( class1 class2 -- ) 1 set-table ; : disconnect ( class1 class2 -- ) 0 set-table ; -: break-around ( classes1 classes2 -- ) - [ disconnect ] [ swap disconnect ] 2bi ; - : make-grapheme-table ( -- ) { CR } { LF } connect { Control CR LF } graphemes disconnect @@ -91,9 +88,6 @@ VALUE: grapheme-table : grapheme-break? ( class1 class2 -- ? ) grapheme-table nth nth not ; -: chars ( i str n -- str[i] str[i+n] ) - swap [ dupd + ] dip [ ?nth ] curry bi@ ; - PRIVATE> : first-grapheme ( str -- i ) diff --git a/core/generic/math/math-docs.factor b/core/generic/math/math-docs.factor index 7d7d6e725b..5953c5ad9b 100644 --- a/core/generic/math/math-docs.factor +++ b/core/generic/math/math-docs.factor @@ -40,6 +40,4 @@ $nl HELP: math-generic { $class-description "The class of generic words using " { $link math-combination } "." } ; -HELP: last/first -{ $values { "seq" sequence } { "pair" "a two-element array" } } -{ $description "Creates an array holding the first and last element of the sequence." } ; + diff --git a/core/generic/math/math.factor b/core/generic/math/math.factor index e88c0c02e4..e0e8b91a2c 100644 --- a/core/generic/math/math.factor +++ b/core/generic/math/math.factor @@ -15,8 +15,6 @@ PREDICATE: math-class < class