diff --git a/basis/classes/struct/bit-accessors/bit-accessors.factor b/basis/classes/struct/bit-accessors/bit-accessors.factor index a801538796..9893ce416c 100644 --- a/basis/classes/struct/bit-accessors/bit-accessors.factor +++ b/basis/classes/struct/bit-accessors/bit-accessors.factor @@ -26,10 +26,10 @@ IN: classes.struct.bit-accessors combine-quot: ( prev-quot shift-amount next-quot -- quot ) -- quot ) offset bits step-quot manipulate-bits - dup zero? [ 3drop ] [ + [ 2drop ] [ step-quot combine-quot bit-manipulator combine-quot call( prev shift next -- quot ) - ] if ; inline recursive + ] if-zero ; inline recursive : bit-reader ( offset bits -- quot: ( alien -- n ) ) [ neg '[ _ alien-unsigned-1 _ bitand _ shift ] ] diff --git a/basis/compiler/tree/propagation/info/info.factor b/basis/compiler/tree/propagation/info/info.factor index 8f0fed8c24..9056a7fb77 100644 --- a/basis/compiler/tree/propagation/info/info.factor +++ b/basis/compiler/tree/propagation/info/info.factor @@ -47,7 +47,7 @@ CONSTANT: object-info T{ value-info f object full-interval } { [ over interval-length 0 > ] [ 3drop f f ] } { [ pick bignum class<= ] [ 2nip >bignum t ] } { [ pick integer class<= ] [ 2nip >fixnum t ] } - { [ pick float class<= ] [ 2nip dup zero? [ drop f f ] [ >float t ] if ] } + { [ pick float class<= ] [ 2nip [ f f ] [ >float t ] if-zero ] } [ 3drop f f ] } cond ] if ; diff --git a/basis/cpu/x86/assembler/assembler.factor b/basis/cpu/x86/assembler/assembler.factor index 49cf0e2d96..a50544d8be 100644 --- a/basis/cpu/x86/assembler/assembler.factor +++ b/basis/cpu/x86/assembler/assembler.factor @@ -309,8 +309,7 @@ PRIVATE> : LEAVE ( -- ) 0xc9 , ; -: RET ( n -- ) - dup zero? [ drop 0xc3 , ] [ 0xc2 , 2, ] if ; +: RET ( n -- ) [ 0xc3 , ] [ 0xc2 , 2, ] if-zero ; ! Arithmetic diff --git a/basis/sequences/generalizations/generalizations.factor b/basis/sequences/generalizations/generalizations.factor index 59eceb3375..e50daf549d 100644 --- a/basis/sequences/generalizations/generalizations.factor +++ b/basis/sequences/generalizations/generalizations.factor @@ -15,11 +15,11 @@ MACRO: firstn-unsafe ( n -- ) [firstn] ; MACRO: firstn ( n -- ) - dup zero? [ drop [ drop ] ] [ + [ [ drop ] ] [ [ 1 - swap bounds-check 2drop ] [ firstn-unsafe ] bi-curry '[ _ _ bi ] - ] if ; + ] if-zero ; MACRO: set-firstn-unsafe ( n -- ) [ 1 + ] @@ -27,11 +27,11 @@ MACRO: set-firstn-unsafe ( n -- ) '[ _ -nrot _ spread drop ] ; MACRO: set-firstn ( n -- ) - dup zero? [ drop [ drop ] ] [ + [ [ drop ] ] [ [ 1 - swap bounds-check 2drop ] [ set-firstn-unsafe ] bi-curry '[ _ _ bi ] - ] if ; + ] if-zero ; : nappend ( n -- seq ) narray concat ; inline diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index ccadd376ed..54fb241582 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -377,9 +377,8 @@ M: ratio >base > key-side dup zero? [ - drop nip avl-delete-node t + 2dup key>> key-side [ + nip avl-delete-node t ] [ [ (avl-delete) ] with-side - ] if ; + ] if-zero ; M: avl delete-at ( key node -- ) [ avl-delete 2drop ] change-root drop ;