From f963b2eb1b34a926c7e0bdda5a568812e28f1968 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 23 Mar 2013 14:37:02 -0700 Subject: [PATCH] growable: use fixnum+fast and integer>fixnum. --- core/growable/growable.factor | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/growable/growable.factor b/core/growable/growable.factor index 35007b8a0c..65fb3f3b62 100644 --- a/core/growable/growable.factor +++ b/core/growable/growable.factor @@ -16,12 +16,12 @@ M: growable set-nth-unsafe underlying>> set-nth-unsafe ; inline fixnum ] keep + [ set-nth-unsafe ] [ [ 1 fixnum+fast ] dip length<< ] 2bi ; inline : push-all-unsafe ( from to src dst -- ) - [ over - swap ] 2dip [ pick ] dip [ length ] keep - [ [ + ] dip length<< ] 2keep (copy) drop ; inline + [ over - swap ] 2dip [ pick ] dip [ length integer>fixnum ] keep + [ [ fixnum+fast ] dip length<< ] 2keep (copy) drop ; inline PRIVATE> @@ -52,10 +52,10 @@ M: growable set-length ( n seq -- ) bounds-check-head 2dup length >= [ 2dup capacity >= [ over new-size over expand ] when - [ >fixnum ] dip + [ integer>fixnum ] dip over 1 fixnum+fast over length<< ] [ - [ >fixnum ] dip + [ integer>fixnum ] dip ] if ; inline M: growable set-nth ensure set-nth-unsafe ; inline