guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 17/30: Add support for bignum? CPS primitive.


From: Andy Wingo
Subject: [Guile-commits] 17/30: Add support for bignum? CPS primitive.
Date: Fri, 24 Nov 2017 09:24:22 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 6866cbd67653f49ef68e5bbea3bc3f133d439db9
Author: Andy Wingo <address@hidden>
Date:   Tue Nov 21 16:08:46 2017 +0100

    Add support for bignum? CPS primitive.
    
    * module/language/cps/compile-bytecode.scm (compile-function):
    * module/language/cps/primitives.scm (*heap-type-predicates*): Add
      support for bignum? CPS primitive.
---
 module/language/cps/compile-bytecode.scm | 1 +
 module/language/cps/primitives.scm       | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/module/language/cps/compile-bytecode.scm 
b/module/language/cps/compile-bytecode.scm
index dfd8129..ad7e97a 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -452,6 +452,7 @@
         (($ $primcall 'keyword? #f (a)) (unary emit-keyword? a))
         (($ $primcall 'heap-number? #f (a)) (unary emit-heap-number? a))
         (($ $primcall 'fixnum? #f (a)) (unary emit-fixnum? a))
+        (($ $primcall 'bignum? #f (a)) (unary emit-bignum? a))
         ;; Add more TC7 tests here.  Keep in sync with
         ;; *branching-primcall-arities* in (language cps primitives) and
         ;; the set of macro-instructions in assembly.scm.
diff --git a/module/language/cps/primitives.scm 
b/module/language/cps/primitives.scm
index 5e102d8..7feead6 100644
--- a/module/language/cps/primitives.scm
+++ b/module/language/cps/primitives.scm
@@ -110,7 +110,8 @@
     keyword?
     bytevector?
     bitvector?
-    heap-number?))
+    heap-number?
+    bignum?))
 
 ;; FIXME: Support these.
 (define *other-predicates*
@@ -129,7 +130,6 @@
     array?
     port?
     smob?
-    bignum?
     flonum?
     complex?
     fraction?))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]