diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index 27ed277c6c..278264c17d 100755 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -128,7 +128,7 @@ PRIVATE> : cleanup ( try cleanup-always cleanup-error -- ) over >r compose [ dip rethrow ] curry - >r (catch) r> ifcc r> call ; inline + recover r> call ; inline : attempt-all ( seq quot -- obj ) [ diff --git a/extra/inverse/inverse.factor b/extra/inverse/inverse.factor index 583ae610c0..cade645dde 100644 --- a/extra/inverse/inverse.factor +++ b/extra/inverse/inverse.factor @@ -69,7 +69,7 @@ UNION: explicit-inverse normal-inverse math-inverse pop-inverse ; } cond ; : math-exp? ( n n word -- ? ) - { + - * / ^ } member? -rot [ number? ] 2apply and and ; + { + - * / ^ } member? -rot [ number? ] both? and ; : (fold-constants) ( quot -- ) dup length 3 < [ % ] [ diff --git a/extra/lint/lint.factor b/extra/lint/lint.factor index 9299e6075e..37209182a0 100644 --- a/extra/lint/lint.factor +++ b/extra/lint/lint.factor @@ -83,7 +83,8 @@ def-hash get-global [ ! Remove n m shift defs [ drop dup length 3 = [ - dup first2 [ number? ] 2apply and swap third \ shift = and not + dup first2 [ number? ] both? + swap third \ shift = and not ] [ drop t ] if ] assoc-subset @@ -132,22 +133,21 @@ M: word lint ( word -- seq ) GENERIC: run-lint ( obj -- obj ) +: (trim-self) + def-hash get-global at* [ + dupd remove empty? not + ] [ + drop f + ] if ; + : trim-self ( seq -- newseq ) - [ - first2 [ - def-hash get-global at* [ - dupd remove empty? not - ] [ - drop f - ] if - ] subset 2array - ] map ; + [ [ (trim-self) ] subset ] assoc-map ; M: sequence run-lint ( seq -- seq ) [ global [ dup . flush ] bind - dup lint 2array - ] map + dup lint + ] { } map>assoc trim-self [ second empty? not ] subset ; @@ -155,5 +155,9 @@ M: word run-lint ( word -- seq ) 1array run-lint ; : lint-all ( -- seq ) - all-words run-lint dup [ lint. ] each ; - + all-words run-lint + [ + nip first dup def-hash get at + [ first ] 2apply literalize = not + ] assoc-subset + dup [ lint. ] each ; diff --git a/extra/visitor/visitor.factor b/extra/visitor/visitor.factor index dd6bad7d97..10c9fb8717 100644 --- a/extra/visitor/visitor.factor +++ b/extra/visitor/visitor.factor @@ -43,7 +43,7 @@ IN: visitor PREDICATE: standard-generic visitor "visitors" word-prop ; PREDICATE: array triple length 3 = ; PREDICATE: triple visitor-spec - first3 visitor? >r [ class? ] 2apply and r> and ; + first3 visitor? >r [ class? ] both? r> and ; M: visitor-spec definer drop \ V: \ ; ; M: visitor definer drop \ VISITOR: f ;