diff --git a/basis/combinators/short-circuit/short-circuit.factor b/basis/combinators/short-circuit/short-circuit.factor index d8bab4dd34..aff25efa96 100644 --- a/basis/combinators/short-circuit/short-circuit.factor +++ b/basis/combinators/short-circuit/short-circuit.factor @@ -12,10 +12,10 @@ MACRO:: n&& ( quots n -- quot ) n '[ _ nnip ] suffix 1array [ cond ] 3append ; -MACRO: 0&& ( quots -- quot ) '[ _ 0 n&& ] ; -MACRO: 1&& ( quots -- quot ) '[ _ 1 n&& ] ; -MACRO: 2&& ( quots -- quot ) '[ _ 2 n&& ] ; -MACRO: 3&& ( quots -- quot ) '[ _ 3 n&& ] ; +: 0&& ( quots -- ? ) [ call ] all? ; +: 1&& ( obj quots -- ? ) [ call ] with all? ; +: 2&& ( obj quots -- ? ) [ call ] with with all? ; +: 3&& ( obj quots -- ? ) [ call ] with with with all? ; MACRO:: n|| ( quots n -- quot ) [ f ] quots [| q | @@ -27,7 +27,8 @@ MACRO:: n|| ( quots n -- quot ) n '[ drop _ ndrop t ] [ f ] 2array suffix 1array [ cond ] 3append ; -MACRO: 0|| ( quots -- quot ) '[ _ 0 n|| ] ; -MACRO: 1|| ( quots -- quot ) '[ _ 1 n|| ] ; -MACRO: 2|| ( quots -- quot ) '[ _ 2 n|| ] ; -MACRO: 3|| ( quots -- quot ) '[ _ 3 n|| ] ; +: 0|| ( quots -- ? ) [ call ] any? ; +: 1|| ( obj quots -- ? ) [ call ] with any? ; +: 2|| ( obj quots -- ? ) [ call ] with with any? ; +: 3|| ( obj quots -- ? ) [ call ] with with with any? ; + diff --git a/basis/stack-checker/transforms/transforms.factor b/basis/stack-checker/transforms/transforms.factor index 056eda8b61..11534c58f9 100755 --- a/basis/stack-checker/transforms/transforms.factor +++ b/basis/stack-checker/transforms/transforms.factor @@ -83,6 +83,38 @@ IN: stack-checker.transforms \ spread t "no-compile" set-word-prop +\ 0&& [ '[ _ 0 n&& ] ] 1 define-transform + +\ 0&& t "no-compile" set-word-prop + +\ 1&& [ '[ _ 1 n&& ] ] 1 define-transform + +\ 1&& t "no-compile" set-word-prop + +\ 2&& [ '[ _ 2 n&& ] ] 1 define-transform + +\ 2&& t "no-compile" set-word-prop + +\ 3&& [ '[ _ 3 n&& ] ] 1 define-transform + +\ 3&& t "no-compile" set-word-prop + +\ 0|| [ '[ _ 0 n|| ] ] 1 define-transform + +\ 0|| t "no-compile" set-word-prop + +\ 1|| [ '[ _ 1 n|| ] ] 1 define-transform + +\ 1|| t "no-compile" set-word-prop + +\ 2|| [ '[ _ 2 n|| ] ] 1 define-transform + +\ 2|| t "no-compile" set-word-prop + +\ 3|| [ '[ _ 3 n|| ] ] 1 define-transform + +\ 3|| t "no-compile" set-word-prop + \ (call-next-method) [ [ [ "method-class" word-prop ]