using integer>fixnum in more places.

db4
John Benediktsson 2012-08-02 14:26:39 -07:00
parent d3ce5c7deb
commit bfd7576f73
2 changed files with 5 additions and 4 deletions

View File

@ -6,8 +6,8 @@ IN: byte-arrays
M: byte-array clone (clone) ; inline
M: byte-array length length>> ; inline
M: byte-array nth-unsafe swap >fixnum alien-unsigned-1 ; inline
M: byte-array set-nth-unsafe swap >fixnum set-alien-unsigned-1 ; inline
M: byte-array nth-unsafe swap integer>fixnum alien-unsigned-1 ; inline
M: byte-array set-nth-unsafe swap integer>fixnum set-alien-unsigned-1 ; inline
: >byte-array ( seq -- byte-array ) B{ } clone-like ; inline
M: byte-array new-sequence drop (byte-array) ; inline

View File

@ -11,10 +11,11 @@ TUPLE: sbuf
: <sbuf> ( n -- sbuf ) 0 <string> 0 sbuf boa ; inline
M: sbuf set-nth-unsafe
[ >fixnum ] [ >fixnum ] [ underlying>> ] tri* set-string-nth ; inline
[ integer>fixnum ] [ integer>fixnum ] [ underlying>> ] tri*
set-string-nth ; inline
M: sbuf new-sequence
drop [ 0 <string> ] [ >fixnum ] bi sbuf boa ; inline
drop [ 0 <string> ] [ integer>fixnum ] bi sbuf boa ; inline
: >sbuf ( seq -- sbuf ) SBUF" " clone-like ; inline