]> gitweb.factorcode.org Git - factor.git/commitdiff
make first2, first3, first4 inline
authorJoe Groff <arcata@gmail.com>
Mon, 26 Oct 2009 22:30:37 +0000 (17:30 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 26 Oct 2009 22:30:37 +0000 (17:30 -0500)
basis/hints/hints.factor
core/sequences/sequences.factor
extra/math/matrices/simd/simd.factor

index f49d2e4229c88a84dcfa89946f61b04e180c738e..496c651fde7d0e7f60eab5c11d2fd3fa6671f7c4 100644 (file)
@@ -78,9 +78,6 @@ SYNTAX: HINTS:
     [ parse-definition { } like "specializer" set-word-prop ] tri ;
 
 ! Default specializers
-{ first first2 first3 first4 }
-[ { array } "specializer" set-word-prop ] each
-
 { last pop* pop } [
     { vector } "specializer" set-word-prop
 ] each
index 93709122c7fd56b3282aa2986799db1e3e761828..dc63acb74914f66cf26cf765793a4fab8c231551 100755 (executable)
@@ -170,13 +170,13 @@ PRIVATE>
     4 swap [ (4sequence) ] new-like ; inline
 
 : first2 ( seq -- first second )
-    1 swap bounds-check nip first2-unsafe ; flushable
+    1 swap bounds-check nip first2-unsafe ; inline
 
 : first3 ( seq -- first second third )
-    2 swap bounds-check nip first3-unsafe ; flushable
+    2 swap bounds-check nip first3-unsafe ; inline
 
 : first4 ( seq -- first second third fourth )
-    3 swap bounds-check nip first4-unsafe ; flushable
+    3 swap bounds-check nip first4-unsafe ; inline
 
 : ?nth ( n seq -- elt/f )
     2dup bounds-check? [ nth-unsafe ] [ 2drop f ] if ; inline
index edbe77781f7d043ffb1f050231c4e290d734bf65..d65d1c4103bb326129aedde0c0dce07db7c82d1f 100644 (file)
@@ -20,7 +20,7 @@ M: matrix4 new-sequence 2drop matrix4 (struct) ; inline
 <PRIVATE
 
 : columns ( a -- a1 a2 a3 a4 )
-    columns>> 4 firstn ; inline
+    columns>> first4 ; inline
 
 :: set-columns ( c1 c2 c3 c4 c -- c )
     c columns>> :> columns