more inlines on struct-arrays to make the optimizing go down smoother

db4
Joe Groff 2009-08-26 19:56:22 -05:00
parent ad463795aa
commit 5376263984
1 changed files with 3 additions and 3 deletions

View File

@ -13,8 +13,8 @@ TUPLE: struct-array
{ element-size array-capacity read-only }
{ class read-only } ;
M: struct-array length length>> ;
M: struct-array byte-length [ length>> ] [ element-size>> ] bi * ;
M: struct-array length length>> ; inline
M: struct-array byte-length [ length>> ] [ element-size>> ] bi * ; inline
: (nth-ptr) ( i struct-array -- alien )
[ element-size>> * ] [ underlying>> ] bi <displaced-alien> ; inline
@ -23,7 +23,7 @@ M: struct-array nth-unsafe
[ (nth-ptr) ] [ class>> dup struct-class? ] bi [ memory>struct ] [ drop ] if ; inline
M: struct-array set-nth-unsafe
[ (nth-ptr) swap ] [ element-size>> ] bi memcpy ;
[ (nth-ptr) swap ] [ element-size>> ] bi memcpy ; inline
M: struct-array new-sequence
[ element-size>> [ * <byte-array> ] 2keep ]