basis/extra: Update last usages of <sliced-groups> to <groups>.

db4
Doug Coleman 2013-03-23 12:08:18 -07:00
parent 11af4e1781
commit f9ea61bf91
16 changed files with 24 additions and 24 deletions

View File

@ -10,7 +10,7 @@ SINGLETON: internet ! RFC 1071
INSTANCE: internet checksum INSTANCE: internet checksum
M: internet checksum-bytes M: internet checksum-bytes
drop 0 swap 2 <sliced-groups> [ le> + ] each drop 0 swap 2 <groups> [ le> + ] each
[ -16 shift ] [ 0xffff bitand ] bi + [ -16 shift ] [ 0xffff bitand ] bi +
[ -16 shift ] keep + bitnot 2 >le ; [ -16 shift ] keep + bitnot 2 >le ;

View File

@ -177,7 +177,7 @@ HINTS: (process-md5-block-I) { uint-array md5-state } ;
: byte-array>le ( byte-array -- byte-array ) : byte-array>le ( byte-array -- byte-array )
little-endian? [ little-endian? [
dup 4 <sliced-groups> [ dup 4 <groups> [
[ [ 1 2 ] dip exchange-unsafe ] [ [ 1 2 ] dip exchange-unsafe ]
[ [ 0 3 ] dip exchange-unsafe ] bi [ [ 0 3 ] dip exchange-unsafe ] bi
] each ] each

View File

@ -290,7 +290,7 @@ GENERIC: pad-initial-bytes ( string sha2 -- padded-string )
[ w+ a ] dip set-nth-unsafe ; inline [ w+ a ] dip set-nth-unsafe ; inline
: prepare-message-schedule ( seq sha2 -- w-seq ) : prepare-message-schedule ( seq sha2 -- w-seq )
[ word-size>> <sliced-groups> [ be> ] map ] [ word-size>> <groups> [ be> ] map ]
[ [
block-size>> [ 0 pad-tail 16 ] keep [a,b) over block-size>> [ 0 pad-tail 16 ] keep [a,b) over
'[ _ prepare-M-256 ] each '[ _ prepare-M-256 ] each
@ -352,7 +352,7 @@ M: sha-256 checksum-stream ( stream checksum -- byte-array )
} 2cleave set-nth-unsafe ; } 2cleave set-nth-unsafe ;
: prepare-sha1-message-schedule ( seq -- w-seq ) : prepare-sha1-message-schedule ( seq -- w-seq )
4 <sliced-groups> [ be> ] map 4 <groups> [ be> ] map
80 0 pad-tail 16 80 [a,b) over 80 0 pad-tail 16 80 [a,b) over
'[ _ sha1-W ] each ; inline '[ _ sha1-W ] each ; inline

View File

@ -483,7 +483,7 @@ cell-bits 32 = [
] unit-test ] unit-test
[ t ] [ [ t ] [
[ { array } declare 2 <sliced-groups> [ . . ] assoc-each ] [ { array } declare 2 <groups> [ . . ] assoc-each ]
\ nth-unsafe inlined? \ nth-unsafe inlined?
] unit-test ] unit-test

View File

@ -67,7 +67,7 @@ M: little-endian unsigned-endian> le> ;
native-endianness get-global dup endianness get = [ native-endianness get-global dup endianness get = [
2drop 2drop
] [ ] [
[ [ <sliced-groups> ] keep ] dip [ [ <groups> ] keep ] dip
little-endian = [ little-endian = [
'[ be> _ >le ] map '[ be> _ >le ] map
] [ ] [

View File

@ -39,7 +39,7 @@ os linux? [
[ pixels h rowstride * memory>byte-array ] [ pixels h rowstride * memory>byte-array ]
[ [
pixels rowstride h * uchar <c-direct-array> pixels rowstride h * uchar <c-direct-array>
rowstride <sliced-groups> rowstride <groups>
[ bytes-per-row head-slice ] map concat [ bytes-per-row head-slice ] map concat
] if ] if
] ; ] ;

View File

@ -15,7 +15,7 @@ ALIAS: start first-unsafe
ALIAS: end second-unsafe ALIAS: end second-unsafe
: find-interval ( key interval-set -- slice ) : find-interval ( key interval-set -- slice )
array>> 2 <sliced-groups> array>> 2 <groups>
[ start <=> ] with search nip ; inline [ start <=> ] with search nip ; inline
ERROR: not-an-interval-set obj ; ERROR: not-an-interval-set obj ;

View File

@ -80,7 +80,7 @@ ARTICLE: "io.mmap.examples" "Memory-mapped file examples"
"SPECIALIZED-ARRAY: char" "SPECIALIZED-ARRAY: char"
"" ""
"\"mydata.dat\" char [" "\"mydata.dat\" char ["
" 4 <sliced-groups>" " 4 <groups>"
" [ reverse! drop ] each" " [ reverse! drop ] each"
"] with-mapped-array" "] with-mapped-array"
} }

View File

@ -30,7 +30,7 @@ IN: tools.hexdump
: hexdump-bytes ( bytes -- ) : hexdump-bytes ( bytes -- )
[ length write-header ] [ length write-header ]
[ 16 <sliced-groups> [ write-hex-line ] each-index ] bi ; [ 16 <groups> [ write-hex-line ] each-index ] bi ;
PRIVATE> PRIVATE>

View File

@ -51,7 +51,7 @@ INSTANCE: data-map-param immutable-sequence
] ; ] ;
: [>object-param] ( class count -- quot ) : [>object-param] ( class count -- quot )
nip '[ _ <sliced-groups> ] ; nip '[ _ <groups> ] ;
: [>param] ( type -- quot ) : [>param] ( type -- quot )
c-type-count over c-type-name? c-type-count over c-type-name?

View File

@ -14,7 +14,7 @@ IN: benchmark.dispatch2
double-array{ 1.0 2.0 3.0 } , double-array{ 1.0 2.0 3.0 } ,
"hello world" 4 tail-slice , "hello world" 4 tail-slice ,
10 f <repetition> , 10 f <repetition> ,
100 iota 2 <sliced-groups> , 100 iota 2 <groups> ,
"hello" <reversed> , "hello" <reversed> ,
{ { 1 2 } { 3 4 } } 0 <column> , { { 1 2 } { 3 4 } } 0 <column> ,
?{ t f t } , ?{ t f t } ,

View File

@ -30,7 +30,7 @@ M: object g drop "object" ;
double-array{ 1.0 2.0 3.0 } , double-array{ 1.0 2.0 3.0 } ,
"hello world" 4 tail-slice , "hello world" 4 tail-slice ,
10 f <repetition> , 10 f <repetition> ,
100 2 <sliced-groups> , 100 2 <groups> ,
"hello" <reversed> , "hello" <reversed> ,
f , f ,
{ { 1 2 } { 3 4 } } 0 <column> , { { 1 2 } { 3 4 } } 0 <column> ,

View File

@ -124,7 +124,7 @@ UNIFORM-TUPLE: loading-uniforms
a b c [ vertexes nth [ n v+ ] change-normal drop ] tri@ ; inline a b c [ vertexes nth [ n v+ ] change-normal drop ] tri@ ; inline
: calc-bunny-normals ( vertexes indexes -- ) : calc-bunny-normals ( vertexes indexes -- )
3 <sliced-groups> swap 3 <groups> swap
[ [ first3 ] dip calc-bunny-normal ] curry each ; inline [ [ first3 ] dip calc-bunny-normal ] curry each ; inline
: normalize-bunny-normals ( vertexes -- ) : normalize-bunny-normals ( vertexes -- )

View File

@ -213,7 +213,7 @@ M: object parse-color-data* ( loading-bitmap header -- loading-bitmap )
[ nip ] [ drop color-index-length ] if read >>color-index ; [ nip ] [ drop color-index-length ] if read >>color-index ;
: alpha-used? ( loading-bitmap -- ? ) : alpha-used? ( loading-bitmap -- ? )
color-index>> 4 <sliced-groups> [ fourth 0 = ] all? not ; color-index>> 4 <groups> [ fourth 0 = ] all? not ;
GENERIC: bitmap>component-order* ( loading-bitmap header -- object ) GENERIC: bitmap>component-order* ( loading-bitmap header -- object )
@ -240,12 +240,12 @@ GENERIC: bitmap>component-order* ( loading-bitmap header -- object )
: color-lookup3 ( loading-bitmap -- seq ) : color-lookup3 ( loading-bitmap -- seq )
[ color-index>> >array ] [ color-index>> >array ]
[ color-palette>> 3 <sliced-groups> ] bi [ color-palette>> 3 <groups> ] bi
'[ _ nth ] map concat ; '[ _ nth ] map concat ;
: color-lookup4 ( loading-bitmap -- seq ) : color-lookup4 ( loading-bitmap -- seq )
[ color-index>> >array ] [ color-index>> >array ]
[ color-palette>> 4 <sliced-groups> [ 3 head-slice ] map ] bi [ color-palette>> 4 <groups> [ 3 head-slice ] map ] bi
'[ _ nth ] map concat ; '[ _ nth ] map concat ;
! os2v1 is 3bytes each, all others are 3 + 1 unused ! os2v1 is 3bytes each, all others are 3 + 1 unused

View File

@ -215,7 +215,7 @@ ERROR: bad-filter n ;
loading-png width>> :> width loading-png width>> :> width
loading-png bit-depth>> :> bit-depth loading-png bit-depth>> :> bit-depth
loading-png png-components-per-pixel :> #bytes! loading-png png-components-per-pixel :> #bytes!
width height * f <array> width <sliced-groups> :> image width height * f <array> width <groups> :> image
bit-depth 16 = [ bit-depth 16 = [
#bytes 2 * #bytes! #bytes 2 * #bytes!
@ -228,7 +228,7 @@ ERROR: bad-filter n ;
[ pass 7 < ] [ [ pass 7 < ] [
ba loading-png pass read-adam7-subimage ba loading-png pass read-adam7-subimage
#bytes <sliced-groups> #bytes <groups>
pass starting-row nth row! pass starting-row nth row!
pass starting-col nth col! pass starting-col nth col!

View File

@ -321,13 +321,13 @@ ERROR: bad-small-ifd-type n ;
{ {
{ 1 [ ] } ! blank { 1 [ ] } ! blank
{ 2 [ ] } ! read c strings here { 2 [ ] } ! read c strings here
{ 3 [ 2 <sliced-groups> [ endian> ] map ] } { 3 [ 2 <groups> [ endian> ] map ] }
{ 4 [ 4 <sliced-groups> [ endian> ] map ] } { 4 [ 4 <groups> [ endian> ] map ] }
{ 5 [ 8 <sliced-groups> [ "II" unpack first2 / ] map ] } { 5 [ 8 <groups> [ "II" unpack first2 / ] map ] }
{ 6 [ [ 8 >signed ] map ] } { 6 [ [ 8 >signed ] map ] }
{ 7 [ ] } ! blank { 7 [ ] } ! blank
{ 8 [ 2 <sliced-groups> [ endian> 16 >signed ] map ] } { 8 [ 2 <groups> [ endian> 16 >signed ] map ] }
{ 9 [ 4 <sliced-groups> [ endian> 32 >signed ] map ] } { 9 [ 4 <groups> [ endian> 32 >signed ] map ] }
{ 10 [ 8 group [ "ii" unpack first2 / ] map ] } { 10 [ 8 group [ "ii" unpack first2 / ] map ] }
{ 11 [ 4 group [ "f" unpack ] map ] } { 11 [ 4 group [ "f" unpack ] map ] }
{ 12 [ 8 group [ "d" unpack ] map ] } { 12 [ 8 group [ "d" unpack ] map ] }