From: Doug Coleman Date: Tue, 21 Feb 2023 01:38:32 +0000 (-0600) Subject: sequences: find-from-unsafe is not unsafe, rename X-Git-Tag: 0.99~541 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=457c94715993b70a62d8e7026ca1e1fec11e1170 sequences: find-from-unsafe is not unsafe, rename --- diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index b0e1f3190b..7ab7a423d5 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -598,7 +598,7 @@ PRIVATE> : bounds-check-call ( n seq quot -- obj1 obj2 ) 2over bounds-check? [ call ] [ 3drop f f ] if ; inline -: find-from-unsafe ( ... n seq quot: ( ... elt -- ... ? ) -- ... i/f seq ) +: do-find-from ( ... n seq quot: ( ... elt -- ... ? ) -- ... i/f seq ) [ length-operator find-integer-from ] keepd ; inline : find-last-from-unsafe ( ... n seq quot: ( ... elt -- ... ? ) -- ... i/f seq ) @@ -607,10 +607,10 @@ PRIVATE> PRIVATE> : find-from ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt ) - '[ _ find-from-unsafe index/element ] bounds-check-call ; inline + '[ _ do-find-from index/element ] bounds-check-call ; inline : find ( ... seq quot: ( ... elt -- ... ? ) -- ... i elt ) - [ 0 ] 2dip find-from-unsafe index/element ; inline + [ 0 ] 2dip do-find-from index/element ; inline : find-last-from ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt ) '[ _ find-last-from-unsafe index/element ] bounds-check-call ; inline @@ -628,10 +628,10 @@ PRIVATE> [ 0 ] 2dip find-index-from ; inline : find-from* ( ... n seq quot: ( ... elt -- ... ? ) -- ... elt i/f ) - '[ _ find-from-unsafe element/index ] bounds-check-call ; inline + '[ _ do-find-from element/index ] bounds-check-call ; inline : find* ( ... seq quot: ( ... elt -- ... ? ) -- ... elt i/f ) - [ 0 ] 2dip find-from-unsafe element/index ; inline + [ 0 ] 2dip do-find-from element/index ; inline : find-last-from* ( ... n seq quot: ( ... elt -- ... ? ) -- ... elt i/f ) '[ _ find-last-from-unsafe element/index ] bounds-check-call ; inline