]> gitweb.factorcode.org Git - factor.git/commitdiff
more inlines on struct-arrays to make the optimizing go down smoother
authorJoe Groff <arcata@gmail.com>
Thu, 27 Aug 2009 00:56:22 +0000 (19:56 -0500)
committerJoe Groff <arcata@gmail.com>
Thu, 27 Aug 2009 00:56:22 +0000 (19:56 -0500)
basis/struct-arrays/struct-arrays.factor

index 0f03c582120ff44e3199f0059c579032d2699e32..97d952f845e3aeafb69626cece2d0ba127417474 100755 (executable)
@@ -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 ]