diff --git a/basis/compiler/tests/optimizer.factor b/basis/compiler/tests/optimizer.factor index 875c6f9100..9f9a6e8e92 100755 --- a/basis/compiler/tests/optimizer.factor +++ b/basis/compiler/tests/optimizer.factor @@ -222,16 +222,6 @@ USE: binary-search.private [ [ - ] swap old-binsearch ] compile-call 2nip ] unit-test -! Regression -TUPLE: silly-tuple a b ; - -[ 1 2 { silly-tuple-a silly-tuple-b } ] [ - T{ silly-tuple f 1 2 } - [ - { silly-tuple-a silly-tuple-b } [ get-slots ] keep - ] compile-call -] unit-test - ! Regression : empty-compound ; diff --git a/basis/peg/peg-tests.factor b/basis/peg/peg-tests.factor index b11b1011c3..11001ca411 100644 --- a/basis/peg/peg-tests.factor +++ b/basis/peg/peg-tests.factor @@ -11,7 +11,7 @@ IN: peg.tests { "begin" "end" } [ "beginend" "begin" token (parse) - { ast>> remaining>> } get-slots + [ ast>> ] [ remaining>> ] bi >string ] unit-test diff --git a/basis/stack-checker/transforms/transforms.factor b/basis/stack-checker/transforms/transforms.factor index 0b2c48068b..d941f3242b 100755 --- a/basis/stack-checker/transforms/transforms.factor +++ b/basis/stack-checker/transforms/transforms.factor @@ -164,8 +164,3 @@ SYMBOL: +transform-n+ \ memq? [ dup sequence? [ memq-quot ] [ drop f ] if ] 1 define-transform - -! Deprecated -\ get-slots [ [ 1quotation ] map [ cleave ] curry ] 1 define-transform - -\ set-slots [ [ get-slots ] curry ] 1 define-transform diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index d60901d993..3f52ee9511 100755 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -52,7 +52,7 @@ TUPLE: button-paint plain rollover pressed selected ; C: button-paint : find-button ( gadget -- button ) - [ [ button? ] is? ] find-parent ; + [ button? ] find-parent ; : button-paint ( button paint -- button paint ) over find-button { diff --git a/basis/ui/gadgets/gadgets.factor b/basis/ui/gadgets/gadgets.factor index 90eea255e8..b20cb9fe5c 100755 --- a/basis/ui/gadgets/gadgets.factor +++ b/basis/ui/gadgets/gadgets.factor @@ -361,8 +361,3 @@ M: f request-focus-on 2drop ; : focus-path ( world -- seq ) [ focus>> ] follow ; - -! Deprecated - -: construct-gadget ( class -- tuple ) - >r { set-delegate } r> construct ; inline diff --git a/basis/ui/gadgets/labelled/labelled.factor b/basis/ui/gadgets/labelled/labelled.factor index dd5b1124e1..077e125b9f 100755 --- a/basis/ui/gadgets/labelled/labelled.factor +++ b/basis/ui/gadgets/labelled/labelled.factor @@ -45,7 +45,7 @@ M: labelled-gadget focusable-child* labelled-gadget-content ; TUPLE: closable-gadget < frame content ; : find-closable-gadget ( parent -- child ) - [ [ closable-gadget? ] is? ] find-parent ; + [ closable-gadget? ] find-parent ; : ( gadget title quot -- gadget ) closable-gadget new-frame diff --git a/basis/ui/gadgets/lists/lists.factor b/basis/ui/gadgets/lists/lists.factor index a4c313f944..10e1f860a7 100755 --- a/basis/ui/gadgets/lists/lists.factor +++ b/basis/ui/gadgets/lists/lists.factor @@ -31,7 +31,7 @@ TUPLE: list < pack index presenter color hook ; swap set-list-index ; : list-presentation-hook ( list -- quot ) - hook>> [ [ [ list? ] is? ] find-parent ] prepend ; + hook>> [ [ list? ] find-parent ] prepend ; : ( hook elt presenter -- gadget ) keep >r >label text-theme r> diff --git a/basis/ui/gadgets/presentations/presentations-tests.factor b/basis/ui/gadgets/presentations/presentations-tests.factor index 55ba2604e8..fcbc65725a 100644 --- a/basis/ui/gadgets/presentations/presentations-tests.factor +++ b/basis/ui/gadgets/presentations/presentations-tests.factor @@ -4,7 +4,7 @@ prettyprint ui.gadgets.buttons io io.streams.string kernel classes.tuple ; [ t ] [ - "Hi" \ + [ gadget? ] is? + "Hi" \ + gadget? ] unit-test [ "+" ] [ diff --git a/basis/ui/gadgets/scrollers/scrollers.factor b/basis/ui/gadgets/scrollers/scrollers.factor index ed825824ef..516f555a70 100755 --- a/basis/ui/gadgets/scrollers/scrollers.factor +++ b/basis/ui/gadgets/scrollers/scrollers.factor @@ -10,7 +10,7 @@ IN: ui.gadgets.scrollers TUPLE: scroller < frame viewport x y follows ; : find-scroller ( gadget -- scroller/f ) - [ [ scroller? ] is? ] find-parent ; + [ scroller? ] find-parent ; : scroll-up-page ( scroller -- ) y>> -1 swap slide-by-page ; diff --git a/basis/ui/gestures/gestures.factor b/basis/ui/gestures/gestures.factor index 34902c203a..8e25d8a535 100755 --- a/basis/ui/gestures/gestures.factor +++ b/basis/ui/gestures/gestures.factor @@ -17,7 +17,7 @@ GENERIC: handle-gesture* ( gadget gesture delegate -- ? ) M: object handle-gesture* default-gesture-handler ; : handle-gesture ( gesture gadget -- ? ) - tuck delegates [ >r 2dup r> handle-gesture* ] all? 2nip ; + tuck >r 2dup r> handle-gesture* 2nip ; : send-gesture ( gesture gadget -- ? ) [ dupd handle-gesture ] each-parent nip ; diff --git a/basis/ui/tools/search/search.factor b/basis/ui/tools/search/search.factor index 2475ecc691..a66b3740cc 100755 --- a/basis/ui/tools/search/search.factor +++ b/basis/ui/tools/search/search.factor @@ -29,7 +29,7 @@ M: live-search handle-gesture* ( gadget gesture delegate -- ? ) ] if ; : find-live-search ( gadget -- search ) - [ [ live-search? ] is? ] find-parent ; + [ live-search? ] find-parent ; : find-search-list ( gadget -- list ) find-live-search live-search-list ; diff --git a/basis/units/units.factor b/basis/units/units.factor index 8f55c96609..251a4e9b47 100755 --- a/basis/units/units.factor +++ b/basis/units/units.factor @@ -1,6 +1,6 @@ -USING: arrays io kernel math namespaces splitting prettyprint -sequences sorting vectors words inverse summary shuffle -math.functions sets ; +USING: accessors arrays io kernel math namespaces splitting +prettyprint sequences sorting vectors words inverse summary +shuffle math.functions sets ; IN: units TUPLE: dimensioned value top bot ; @@ -28,8 +28,7 @@ M: dimensions-not-equal summary drop "Dimensions do not match" ; dimensioned boa ; : >dimensioned< ( d -- n top bot ) - { dimensioned-value dimensioned-top dimensioned-bot } - get-slots ; + [ value>> ] [ top>> ] [ bot>> ] tri ; \ [ >dimensioned< ] define-inverse diff --git a/basis/windows/com/syntax/syntax.factor b/basis/windows/com/syntax/syntax.factor index b607027332..2f766a3a51 100755 --- a/basis/windows/com/syntax/syntax.factor +++ b/basis/windows/com/syntax/syntax.factor @@ -74,7 +74,7 @@ unless : (define-word-for-function) ( function interface n -- ) -rot [ (function-word) swap ] 2keep drop - { return>> parameters>> } get-slots + [ return>> ] [ parameters>> ] bi [ (invocation-quot) ] 2keep (stack-effect-from-return-and-parameters) define-declared ; diff --git a/core/classes/tuple/tuple-docs.factor b/core/classes/tuple/tuple-docs.factor index 0cf3091165..01ade6ad05 100755 --- a/core/classes/tuple/tuple-docs.factor +++ b/core/classes/tuple/tuple-docs.factor @@ -425,28 +425,6 @@ HELP: new } } ; -HELP: construct -{ $values { "..." "slot values" } { "slots" "a sequence of setter words" } { "class" tuple-class } { "tuple" tuple } } -{ $description "Creates a new instance of " { $snippet "class" } ", storing consecutive stack values into the slots of the new tuple using setter words in " { $snippet "slots" } ". The top-most stack element is stored in the right-most slot." } -{ $examples - "We can define a class:" - { $code "TUPLE: color red green blue alpha ;" } - "Together with two constructors:" - { $code - ": ( r g b -- color )" - " { set-color-red set-color-green set-color-blue }" - " color construct ;" - "" - ": ( r g b a -- color )" - " { set-color-red set-color-green set-color-blue set-color-alpha }" - " color construct ;" - } - "The last definition is actually equivalent to the following:" - { $code ": ( r g b a -- color ) rgba boa ;" } - "Which can be abbreviated further:" - { $code "C: color" } -} ; - HELP: boa { $values { "..." "slot values" } { "class" tuple-class } { "tuple" tuple } } { $description "Creates a new instance of " { $snippet "class" } " and fill in the slots from the stack, with the top-most stack element being stored in the right-most slot." } diff --git a/core/classes/tuple/tuple.factor b/core/classes/tuple/tuple.factor index 4366349b58..4ff9d4c674 100755 --- a/core/classes/tuple/tuple.factor +++ b/core/classes/tuple/tuple.factor @@ -320,14 +320,3 @@ M: tuple-class boa bi ; M: tuple-class initial-value* new ; - -! Deprecated -M: object get-slots ( obj slots -- ... ) - [ execute ] with each ; - -M: object set-slots ( ... obj slots -- ) - get-slots ; - -: delegates ( obj -- seq ) [ delegate ] follow ; - -: is? ( obj quot -- ? ) >r delegates r> contains? ; inline diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 337fe6c8b0..6c9b64b192 100755 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -206,17 +206,3 @@ GENERIC: delegate ( obj -- delegate ) M: tuple delegate 2 slot ; M: object delegate drop f ; - -GENERIC: set-delegate ( delegate tuple -- ) - -M: tuple set-delegate 2 set-slot ; - -GENERIC# get-slots 1 ( tuple slots -- ... ) - -GENERIC# set-slots 1 ( ... tuple slots -- ) - -: construct ( ... slots class -- tuple ) - new [ swap set-slots ] keep ; inline - -: construct-delegate ( delegate class -- tuple ) - >r { set-delegate } r> construct ; inline diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 306caea9a7..fcda5be80e 100755 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -533,8 +533,8 @@ $nl "Slot specifiers take one of the following three forms:" { $list { { $snippet "name" } " - a slot which can hold any object, with no attributes" } - { { $snippet "{ \"name\" attributes... }" } " - a slot which can hold any object, with optional attributes" } - { { $snippet "{ \"name\" class attributes... }" } " - a slot specialized to a specific class, with optional attributes" } + { { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" } + { { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" } } "Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } { $examples