]> gitweb.factorcode.org Git - factor.git/commitdiff
growable: use integer>fixnum-strict
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 13 Feb 2022 23:04:51 +0000 (15:04 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 13 Feb 2022 23:04:51 +0000 (15:04 -0800)
core/growable/growable.factor

index 919e5ef3077abf4ad69f3ea3149f9b5c41fbdb6a..e6daa965a4cdae3cc709e0662c8cbd4556d5b019 100644 (file)
@@ -16,11 +16,11 @@ M: growable set-nth-unsafe underlying>> set-nth-unsafe ; inline
 <PRIVATE
 
 : push-unsafe ( elt seq -- )
-    [ length integer>fixnum ] keep
+    [ length integer>fixnum-strict ] keep
     [ set-nth-unsafe ] [ [ 1 fixnum+fast ] dip length<< ] 2bi ; inline
 
 : push-all-unsafe ( from to src dst -- )
-    [ over - swap ] 2dip pickd [ length integer>fixnum ] keep
+    [ over - swap ] 2dip pickd [ length integer>fixnum-strict ] keep
     [ [ fixnum+fast ] dip length<< ] 2keep <copy> (copy) drop ; inline
 
 PRIVATE>
@@ -52,10 +52,10 @@ M: growable set-length
     bounds-check-head
     2dup length >= [
         2dup capacity >= [ over new-size over expand ] when
-        [ integer>fixnum ] dip
+        [ integer>fixnum-strict ] dip
         over 1 fixnum+fast >>length
     ] [
-        [ integer>fixnum ] dip
+        [ integer>fixnum-strict ] dip
     ] if ; inline
 
 M: growable set-nth ensure set-nth-unsafe ; inline