From 5caa118e409631afed8ced8bb502953aeb4733a5 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 26 Oct 2009 17:30:37 -0500 Subject: [PATCH] make first2, first3, first4 inline --- basis/hints/hints.factor | 3 --- core/sequences/sequences.factor | 6 +++--- extra/math/matrices/simd/simd.factor | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/basis/hints/hints.factor b/basis/hints/hints.factor index f49d2e4229..496c651fde 100644 --- a/basis/hints/hints.factor +++ b/basis/hints/hints.factor @@ -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 diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 93709122c7..dc63acb749 100755 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -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 diff --git a/extra/math/matrices/simd/simd.factor b/extra/math/matrices/simd/simd.factor index edbe77781f..d65d1c4103 100644 --- a/extra/math/matrices/simd/simd.factor +++ b/extra/math/matrices/simd/simd.factor @@ -20,7 +20,7 @@ M: matrix4 new-sequence 2drop matrix4 (struct) ; inline > 4 firstn ; inline + columns>> first4 ; inline :: set-columns ( c1 c2 c3 c4 c -- c ) c columns>> :> columns