]> gitweb.factorcode.org Git - factor.git/commitdiff
slice boa -> <slice-unsafe>
authorJoe Groff <arcata@gmail.com>
Thu, 10 Nov 2011 03:22:09 +0000 (19:22 -0800)
committerJoe Groff <arcata@gmail.com>
Thu, 10 Nov 2011 03:22:09 +0000 (19:22 -0800)
If you didn't define it, don't boa it

basis/grouping/grouping.factor
basis/regexp/regexp.factor
basis/sequences/parser/parser.factor
basis/tuple-arrays/tuple-arrays.factor
core/sequences/sequences.factor

index 09e87698cf4d3bc1ea571f428dc5afc55ee1317a..6cc5bb164a75529b536a531e6556b15e61c18ce0 100644 (file)
@@ -25,7 +25,7 @@ INSTANCE: slice-chunking chunking
 INSTANCE: slice-chunking sequence
 
 M: slice-chunking nth group@ <slice> ; inline
-M: slice-chunking nth-unsafe group@ slice boa ; inline
+M: slice-chunking nth-unsafe group@ <slice-unsafe> ; inline
 
 MIXIN: abstract-groups
 INSTANCE: abstract-groups sequence
index 6ad6060dcf38dcf1dab23b344357c9c42e012ded..6070921d8d4026608322594606509306e6e3d28c 100644 (file)
@@ -103,7 +103,7 @@ PRIVATE>
     collector [ each-match ] dip >array ; inline
 
 : all-matching-slices ( string regexp -- seq )
-    [ slice boa ] map-matches ;
+    [ <slice-unsafe> ] map-matches ;
 
 : all-matching-subseqs ( string regexp -- seq )
     [ subseq ] map-matches ;
@@ -126,14 +126,14 @@ PRIVATE>
 :: first-match ( string regexp -- slice/f )
     string regexp prepare-match-iterator do-next-match [
         regexp reverse-regexp? [ [ 1 + ] bi@ ] when
-        string slice boa
+        string <slice-unsafe>
     ] [ 2drop f ] if ;
 
 : re-contains? ( string regexp -- ? )
     prepare-match-iterator do-next-match [ 2drop ] dip >boolean ;
 
 : re-split ( string regexp -- seq )
-    [ slice boa ] (re-split) ;
+    [ <slice-unsafe> ] (re-split) ;
 
 : re-replace ( string regexp replacement -- result )
     [ [ subseq ] (re-split) ] dip join ;
index 8e1b1f540cc771d7fd4f73e35b3a32cc6c58ae8a..c1494fed09fdb97ff24f27aff71b9aea83268f5d 100644 (file)
@@ -64,7 +64,7 @@ TUPLE: sequence-parser sequence n ;
         [ 2drop 0 < ]
         [ [ drop ] 2dip length > ]
         [ drop > ]
-    } 3|| [ 3drop f ] [ slice boa ] if ; inline
+    } 3|| [ 3drop f ] [ <slice-unsafe> ] if ; inline
 
 :: take-sequence ( sequence-parser sequence -- obj/f )
     sequence-parser [ n>> dup sequence length + ] [ sequence>> ] bi
index 1a3091c1e233256f542e4b97be2572d7d6bf6926..869f8bf5a1bb5a1390c6f67c7c02b210a217f90f 100644 (file)
@@ -21,7 +21,7 @@ MACRO: boa-unsafe ( class -- quot ) tuple-layout '[ _ <tuple-boa> ] ;
     [ new ] [ smart-tuple>array ] bi ; inline
 
 : tuple-slice ( n seq -- slice )
-    [ n>> [ * dup ] keep + ] [ seq>> ] bi slice boa ; inline
+    [ n>> [ * dup ] keep + ] [ seq>> ] bi <slice-unsafe> ; inline
 
 : read-tuple ( slice class -- tuple )
     '[ _ boa-unsafe ] input<sequence-unsafe ; inline
index bd17c0ff7e396ec3e04a280597749aff859d5c24..ad2a5ea48282ad3a790568a910afa97f870323cc 100644 (file)
@@ -234,7 +234,7 @@ PRIVATE>
 : <slice> ( from to seq -- slice )
     check-slice
     dup slice? [ collapse-slice ] when
-    slice boa ; inline
+    <slice-unsafe> ; inline
 
 M: slice virtual-exemplar seq>> ; inline