]> gitweb.factorcode.org Git - factor.git/commitdiff
io.streams.byte-array.fast: don't need >c-ptr.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 6 Apr 2016 19:39:50 +0000 (12:39 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 6 Apr 2016 19:39:50 +0000 (12:39 -0700)
basis/io/streams/byte-array/fast/fast.factor

index e231335bfdc67bcc3e36db2b7715b4040e1a1384..2948e2bc61dd2b0f1bc067f5e3df40414cb1d03a 100644 (file)
@@ -8,8 +8,6 @@ IN: io.streams.byte-array.fast
 ! optimizing compiler has been loaded.
 
 M: byte-vector stream-write
-    [ dup byte-length tail-slice ]
-    [ [ [ byte-length ] bi@ + ] keep lengthen ]
-    [ drop byte-length ]
-    2tri
-    [ >c-ptr swap >c-ptr ] dip memcpy ;
+    [ dup byte-length tail-slice swap ]
+    [ [ [ byte-length ] bi@ + ] keep lengthen ] 2bi
+    dup byte-length memcpy ;