]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: seq-copy-loop -> copy-loop
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 5 Feb 2023 19:29:58 +0000 (13:29 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 26 Feb 2023 23:11:03 +0000 (17:11 -0600)
core/io/streams/sequence/sequence.factor
core/sequences/sequences.factor
core/sorting/sorting.factor
extra/sequences/seq/seq.factor

index bae13f6969af93c1c7f4991fb61b8d66a9611e47..ee46d1bcc63381ef7058acd96ce584a036729410 100644 (file)
@@ -24,7 +24,7 @@ SLOT: i
     [
         [ (sequence-read-length) ]
         [ [ dup pick + ] change-i underlying>> ] bi
-    ] dip [ -roll spin dupd + seq-copy-loop drop ] 3curry keep ; inline
+    ] dip [ -roll spin dupd + copy-loop drop ] 3curry keep ; inline
 
 : (sequence-read-unsafe) ( n buf stream -- count )
     [ integer>fixnum ]
index ce5d307dcba7aece04bfe436de8ed08b06bf759f..352ba460073202d8c6b176b3072027ce2c978ae6 100644 (file)
@@ -364,14 +364,14 @@ C: <copier> copier
 : subseq-unsafe ( from to seq -- subseq )
     dup subseq-unsafe-as ; inline
 
-: seq-copy-loop ( dst dst-i src src-i src-stop -- dst )
+: copy-loop ( dst dst-i src src-i src-stop -- dst )
     2dup >= [
         4drop
     ] [
         [
             [ copy-nth-of-unsafe ] 4keep
             [ 1 + ] 2dip 1 +
-        ] dip seq-copy-loop
+        ] dip copy-loop
     ] if ; inline recursive
 
 PRIVATE>
index 01b2d0e0f327fb628d28a5e3ca1fef68163c48b7..cc3cbfca432e1a8aee3302e9b08542bb71d52f18 100644 (file)
@@ -37,14 +37,14 @@ TUPLE: merge-state
     [ [ to1>> ] [ from1>> fixnum-fast ] [ accum>> length integer>fixnum-strict ] tri [ fixnum+fast >>length ] 2keep ]
     [ seq>> ]
     [ from1>> roll dupd fixnum+fast ] tri
-    seq-copy-loop drop ; inline
+    copy-loop drop ; inline
 
 : dump-r ( merge -- )
     [ accum>> ] keep
     [ [ to2>> ] [ from2>> fixnum-fast ] [ accum>> length integer>fixnum-strict ] tri [ fixnum+fast >>length ] 2keep ]
     [ seq>> ]
     [ from2>> roll dupd fixnum+fast ] tri
-    seq-copy-loop drop ; inline
+    copy-loop drop ; inline
 
 : l-next ( merge -- )
     [ l-elt ] [ [ 1 + ] change-from1 accum>> ] bi push-unsafe ; inline
index cd4813348456bd6c03f264e8ef45e8ded0f6c5d7..afce387f8598b0018566ded0fa0f3e92a4da7df5 100644 (file)
@@ -18,18 +18,8 @@ M: sequence seq-shorten 2dup lengthd > [ seq-set-length ] [ drop ] if ; inline
 : seq-grow-copy ( dst n -- dst dst-n )
     [ over length + seq-lengthen ] keep 1 - ; inline
 
-: seq-copy-loop ( dst dst-i src src-i src-stop -- dst )
-    2dup >= [
-        4drop
-    ] [
-        [
-            [ copy-nth-of-unsafe ] 4keep
-            [ 1 + ] 2dip 1 +
-        ] dip seq-copy-loop
-    ] if ; inline recursive
-
 : seq-copy-unsafe ( dst dst-i src -- dst )
-    0 over length check-length seq-copy-loop ; inline
+    0 over length check-length copy-loop ; inline
 
 : seq-push-all ( dst src -- dst ) [ length seq-grow-copy ] keep seq-copy-unsafe ; inline