basis/extra: Update last usages of <sliced-groups> to <groups>.
parent
11af4e1781
commit
f9ea61bf91
|
@ -10,7 +10,7 @@ SINGLETON: internet ! RFC 1071
|
|||
INSTANCE: internet checksum
|
||||
|
||||
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 ] keep + bitnot 2 >le ;
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ HINTS: (process-md5-block-I) { uint-array md5-state } ;
|
|||
|
||||
: byte-array>le ( byte-array -- byte-array )
|
||||
little-endian? [
|
||||
dup 4 <sliced-groups> [
|
||||
dup 4 <groups> [
|
||||
[ [ 1 2 ] dip exchange-unsafe ]
|
||||
[ [ 0 3 ] dip exchange-unsafe ] bi
|
||||
] each
|
||||
|
|
|
@ -290,7 +290,7 @@ GENERIC: pad-initial-bytes ( string sha2 -- padded-string )
|
|||
[ w+ a ] dip set-nth-unsafe ; inline
|
||||
|
||||
: 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
|
||||
'[ _ prepare-M-256 ] each
|
||||
|
@ -352,7 +352,7 @@ M: sha-256 checksum-stream ( stream checksum -- byte-array )
|
|||
} 2cleave set-nth-unsafe ;
|
||||
|
||||
: 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
|
||||
'[ _ sha1-W ] each ; inline
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ cell-bits 32 = [
|
|||
] unit-test
|
||||
|
||||
[ t ] [
|
||||
[ { array } declare 2 <sliced-groups> [ . . ] assoc-each ]
|
||||
[ { array } declare 2 <groups> [ . . ] assoc-each ]
|
||||
\ nth-unsafe inlined?
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ M: little-endian unsigned-endian> le> ;
|
|||
native-endianness get-global dup endianness get = [
|
||||
2drop
|
||||
] [
|
||||
[ [ <sliced-groups> ] keep ] dip
|
||||
[ [ <groups> ] keep ] dip
|
||||
little-endian = [
|
||||
'[ be> _ >le ] map
|
||||
] [
|
||||
|
|
|
@ -39,7 +39,7 @@ os linux? [
|
|||
[ pixels h rowstride * memory>byte-array ]
|
||||
[
|
||||
pixels rowstride h * uchar <c-direct-array>
|
||||
rowstride <sliced-groups>
|
||||
rowstride <groups>
|
||||
[ bytes-per-row head-slice ] map concat
|
||||
] if
|
||||
] ;
|
||||
|
|
|
@ -15,7 +15,7 @@ ALIAS: start first-unsafe
|
|||
ALIAS: end second-unsafe
|
||||
|
||||
: find-interval ( key interval-set -- slice )
|
||||
array>> 2 <sliced-groups>
|
||||
array>> 2 <groups>
|
||||
[ start <=> ] with search nip ; inline
|
||||
|
||||
ERROR: not-an-interval-set obj ;
|
||||
|
|
|
@ -80,7 +80,7 @@ ARTICLE: "io.mmap.examples" "Memory-mapped file examples"
|
|||
"SPECIALIZED-ARRAY: char"
|
||||
""
|
||||
"\"mydata.dat\" char ["
|
||||
" 4 <sliced-groups>"
|
||||
" 4 <groups>"
|
||||
" [ reverse! drop ] each"
|
||||
"] with-mapped-array"
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ IN: tools.hexdump
|
|||
|
||||
: hexdump-bytes ( bytes -- )
|
||||
[ length write-header ]
|
||||
[ 16 <sliced-groups> [ write-hex-line ] each-index ] bi ;
|
||||
[ 16 <groups> [ write-hex-line ] each-index ] bi ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ INSTANCE: data-map-param immutable-sequence
|
|||
] ;
|
||||
|
||||
: [>object-param] ( class count -- quot )
|
||||
nip '[ _ <sliced-groups> ] ;
|
||||
nip '[ _ <groups> ] ;
|
||||
|
||||
: [>param] ( type -- quot )
|
||||
c-type-count over c-type-name?
|
||||
|
|
|
@ -14,7 +14,7 @@ IN: benchmark.dispatch2
|
|||
double-array{ 1.0 2.0 3.0 } ,
|
||||
"hello world" 4 tail-slice ,
|
||||
10 f <repetition> ,
|
||||
100 iota 2 <sliced-groups> ,
|
||||
100 iota 2 <groups> ,
|
||||
"hello" <reversed> ,
|
||||
{ { 1 2 } { 3 4 } } 0 <column> ,
|
||||
?{ t f t } ,
|
||||
|
|
|
@ -30,7 +30,7 @@ M: object g drop "object" ;
|
|||
double-array{ 1.0 2.0 3.0 } ,
|
||||
"hello world" 4 tail-slice ,
|
||||
10 f <repetition> ,
|
||||
100 2 <sliced-groups> ,
|
||||
100 2 <groups> ,
|
||||
"hello" <reversed> ,
|
||||
f ,
|
||||
{ { 1 2 } { 3 4 } } 0 <column> ,
|
||||
|
|
|
@ -124,7 +124,7 @@ UNIFORM-TUPLE: loading-uniforms
|
|||
a b c [ vertexes nth [ n v+ ] change-normal drop ] tri@ ; inline
|
||||
|
||||
: calc-bunny-normals ( vertexes indexes -- )
|
||||
3 <sliced-groups> swap
|
||||
3 <groups> swap
|
||||
[ [ first3 ] dip calc-bunny-normal ] curry each ; inline
|
||||
|
||||
: normalize-bunny-normals ( vertexes -- )
|
||||
|
|
|
@ -213,7 +213,7 @@ M: object parse-color-data* ( loading-bitmap header -- loading-bitmap )
|
|||
[ nip ] [ drop color-index-length ] if read >>color-index ;
|
||||
|
||||
: 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 )
|
||||
|
||||
|
@ -240,12 +240,12 @@ GENERIC: bitmap>component-order* ( loading-bitmap header -- object )
|
|||
|
||||
: color-lookup3 ( loading-bitmap -- seq )
|
||||
[ color-index>> >array ]
|
||||
[ color-palette>> 3 <sliced-groups> ] bi
|
||||
[ color-palette>> 3 <groups> ] bi
|
||||
'[ _ nth ] map concat ;
|
||||
|
||||
: color-lookup4 ( loading-bitmap -- seq )
|
||||
[ 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 ;
|
||||
|
||||
! os2v1 is 3bytes each, all others are 3 + 1 unused
|
||||
|
|
|
@ -215,7 +215,7 @@ ERROR: bad-filter n ;
|
|||
loading-png width>> :> width
|
||||
loading-png bit-depth>> :> bit-depth
|
||||
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 = [
|
||||
#bytes 2 * #bytes!
|
||||
|
@ -228,7 +228,7 @@ ERROR: bad-filter n ;
|
|||
[ pass 7 < ] [
|
||||
ba loading-png pass read-adam7-subimage
|
||||
|
||||
#bytes <sliced-groups>
|
||||
#bytes <groups>
|
||||
|
||||
pass starting-row nth row!
|
||||
pass starting-col nth col!
|
||||
|
|
|
@ -321,13 +321,13 @@ ERROR: bad-small-ifd-type n ;
|
|||
{
|
||||
{ 1 [ ] } ! blank
|
||||
{ 2 [ ] } ! read c strings here
|
||||
{ 3 [ 2 <sliced-groups> [ endian> ] map ] }
|
||||
{ 4 [ 4 <sliced-groups> [ endian> ] map ] }
|
||||
{ 5 [ 8 <sliced-groups> [ "II" unpack first2 / ] map ] }
|
||||
{ 3 [ 2 <groups> [ endian> ] map ] }
|
||||
{ 4 [ 4 <groups> [ endian> ] map ] }
|
||||
{ 5 [ 8 <groups> [ "II" unpack first2 / ] map ] }
|
||||
{ 6 [ [ 8 >signed ] map ] }
|
||||
{ 7 [ ] } ! blank
|
||||
{ 8 [ 2 <sliced-groups> [ endian> 16 >signed ] map ] }
|
||||
{ 9 [ 4 <sliced-groups> [ endian> 32 >signed ] map ] }
|
||||
{ 8 [ 2 <groups> [ endian> 16 >signed ] map ] }
|
||||
{ 9 [ 4 <groups> [ endian> 32 >signed ] map ] }
|
||||
{ 10 [ 8 group [ "ii" unpack first2 / ] map ] }
|
||||
{ 11 [ 4 group [ "f" unpack ] map ] }
|
||||
{ 12 [ 8 group [ "d" unpack ] map ] }
|
||||
|
|
Loading…
Reference in New Issue