]> gitweb.factorcode.org Git - factor.git/commitdiff
unix.factor: Use count
authorkusumotonorio <47816570+kusumotonorio@users.noreply.github.com>
Mon, 20 Jan 2020 09:53:26 +0000 (18:53 +0900)
committerkusumotonorio <47816570+kusumotonorio@users.noreply.github.com>
Mon, 20 Jan 2020 09:53:26 +0000 (18:53 +0900)
basis/cpu/x86/64/unix/unix.factor

index ffb287f6e09c131cd71c71da1b9247b28db0407e..caef383769add90c53464719eb15ea455fa42268 100644 (file)
@@ -31,15 +31,8 @@ M: x86.64 reserved-stack-space 0 ;
         f f 3array
     ] map :> reps
     int-reg-reps get float-reg-reps get and [
-        0 :> int-mems!
-        0 :> float-mems!
-        reps [
-            first int-rep? [
-                int-mems 1 + int-mems!
-            ] [
-                float-mems 1 + float-mems!
-            ] if
-        ] each
+        reps [ first int-rep? ] count :> int-mems
+        reps length int-mems - :> float-mems
         int-reg-reps get int-mems + 6 >
         float-reg-reps get float-mems + 8 > or [
             reps [ first t f 3array ] map