]> gitweb.factorcode.org Git - factor.git/commitdiff
Stop inc-not-f and dec-not-f, etc
authorkusumotonorio <47816570+kusumotonorio@users.noreply.github.com>
Sun, 19 Jan 2020 05:30:38 +0000 (14:30 +0900)
committerkusumotonorio <47816570+kusumotonorio@users.noreply.github.com>
Sun, 19 Jan 2020 05:30:38 +0000 (14:30 +0900)
basis/compiler/cfg/builder/alien/boxing/boxing.factor
basis/cpu/x86/64/unix/unix.factor

index e0fcc580276092e327da9bd9c821b47b137a3c7e..75321ec62d3c03f32abd5ff451b1b68fe9ab92c6 100644 (file)
@@ -12,25 +12,19 @@ SYMBOL: struct-return-area
 
 SYMBOLS: int-reg-reps float-reg-reps ;
 
-<PRIVATE
-
-: inc-not-f ( variable -- ) dup get [ inc ] [ drop ] if ; inline
-
-: dec-not-f ( variable -- ) dup get [ dec ] [ drop ] if ; inline
-
-PRIVATE>
-
 : record-reg-reps ( reps -- reps )
     dup [
         dup second not [  ! on-stack?: f 
-            first int-rep? int-reg-reps float-reg-reps ? inc-not-f
+            first int-rep? int-reg-reps float-reg-reps ?
+            dup get [ inc ] [ drop ] if
         ] [ drop ] if
     ] each ;
 
 : unrecord-reg-reps ( reps -- reps )
     dup [
         dup second not [  ! on-stack?: f 
-            first int-rep? int-reg-reps float-reg-reps ? dec-not-f
+            first int-rep? int-reg-reps float-reg-reps ?
+            dup get [ dec ] [ drop ] if
         ] [ drop ] if
     ] each ;
 
index 5ebdb8b6d288c9a1daf49a76b8d4b362c06d3acc..ffb287f6e09c131cd71c71da1b9247b28db0407e 100644 (file)
@@ -27,7 +27,8 @@ M: x86.64 reserved-stack-space 0 ;
 :: flatten-small-struct ( c-type -- seq )
     c-type struct-types&offset split-struct [
         [ lookup-c-type c-type-rep reg-class-of ] map
-        int-regs swap member? int-rep double-rep ? f f 3array
+        int-regs swap member? int-rep double-rep ?
+        f f 3array
     ] map :> reps
     int-reg-reps get float-reg-reps get and [
         0 :> int-mems!