* added bignum? primitive and removed ikrt_isbignum from the runtime

system.
This commit is contained in:
Abdulaziz Ghuloum 2007-03-04 13:02:39 -05:00
parent c6861f41d5
commit 893a2decc8
5 changed files with 11 additions and 7 deletions

Binary file not shown.

View File

@ -65,6 +65,7 @@ verify_bignum(ikp x, char* caller){
#define BN(x) verify_bignum(x,"BN")
#if 0
ikp
ikrt_isbignum(ikp x){
if(tagof(x) == vector_tag){
@ -75,6 +76,7 @@ ikrt_isbignum(ikp x){
}
return false_object;
}
#endif
ikp
ikrt_positive_bn(ikp x){

Binary file not shown.

View File

@ -19,11 +19,11 @@
(let ()
(define bignum?
; FIXME: temporary definition. Compiler should be made aware
; of numeric representation once it's stable enough.
(lambda (x)
(foreign-call "ikrt_isbignum" x)))
;;; (define bignum?
;;; ; FIXME: temporary definition. Compiler should be made aware
;;; ; of numeric representation once it's stable enough.
;;; (lambda (x)
;;; (foreign-call "ikrt_isbignum" x)))
(define (fixnum->flonum x)
(foreign-call "ikrt_fixnum_to_flonum" x))
@ -818,5 +818,7 @@
(primitive-set! 'integer? integer?)
(primitive-set! 'exact->inexact exact->inexact)
(primitive-set! 'modulo modulo)
(primitive-set! 'bignum? bignum?)
(primitive-set! 'bignum?
(lambda (x) (bignum? x)))
)

View File

@ -34,7 +34,7 @@
(define public-primitives
'(
null? pair? char? fixnum? symbol? gensym? string? vector? list?
null? pair? char? fixnum? bignum? symbol? gensym? string? vector? list?
boolean? procedure? not eof-object eof-object? bwp-object?
void fx= fx< fx<= fx> fx>= fxzero? fx+ fx- fx* fxadd1 fxsub1
fxquotient fxremainder fxmodulo fxsll fxsra fxlognot fxlogor