make first2, first3, first4 inline
parent
ab04d4479e
commit
5caa118e40
|
@ -78,9 +78,6 @@ SYNTAX: HINTS:
|
||||||
[ parse-definition { } like "specializer" set-word-prop ] tri ;
|
[ parse-definition { } like "specializer" set-word-prop ] tri ;
|
||||||
|
|
||||||
! Default specializers
|
! Default specializers
|
||||||
{ first first2 first3 first4 }
|
|
||||||
[ { array } "specializer" set-word-prop ] each
|
|
||||||
|
|
||||||
{ last pop* pop } [
|
{ last pop* pop } [
|
||||||
{ vector } "specializer" set-word-prop
|
{ vector } "specializer" set-word-prop
|
||||||
] each
|
] each
|
||||||
|
|
|
@ -170,13 +170,13 @@ PRIVATE>
|
||||||
4 swap [ (4sequence) ] new-like ; inline
|
4 swap [ (4sequence) ] new-like ; inline
|
||||||
|
|
||||||
: first2 ( seq -- first second )
|
: 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 )
|
: 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 )
|
: 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 )
|
: ?nth ( n seq -- elt/f )
|
||||||
2dup bounds-check? [ nth-unsafe ] [ 2drop f ] if ; inline
|
2dup bounds-check? [ nth-unsafe ] [ 2drop f ] if ; inline
|
||||||
|
|
|
@ -20,7 +20,7 @@ M: matrix4 new-sequence 2drop matrix4 (struct) ; inline
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: columns ( a -- a1 a2 a3 a4 )
|
: columns ( a -- a1 a2 a3 a4 )
|
||||||
columns>> 4 firstn ; inline
|
columns>> first4 ; inline
|
||||||
|
|
||||||
:: set-columns ( c1 c2 c3 c4 c -- c )
|
:: set-columns ( c1 c2 c3 c4 c -- c )
|
||||||
c columns>> :> columns
|
c columns>> :> columns
|
||||||
|
|
Loading…
Reference in New Issue