* 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") #define BN(x) verify_bignum(x,"BN")
#if 0
ikp ikp
ikrt_isbignum(ikp x){ ikrt_isbignum(ikp x){
if(tagof(x) == vector_tag){ if(tagof(x) == vector_tag){
@ -75,6 +76,7 @@ ikrt_isbignum(ikp x){
} }
return false_object; return false_object;
} }
#endif
ikp ikp
ikrt_positive_bn(ikp x){ ikrt_positive_bn(ikp x){

Binary file not shown.

View File

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

View File

@ -34,7 +34,7 @@
(define public-primitives (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? boolean? procedure? not eof-object eof-object? bwp-object?
void fx= fx< fx<= fx> fx>= fxzero? fx+ fx- fx* fxadd1 fxsub1 void fx= fx< fx<= fx> fx>= fxzero? fx+ fx- fx* fxadd1 fxsub1
fxquotient fxremainder fxmodulo fxsll fxsra fxlognot fxlogor fxquotient fxremainder fxmodulo fxsll fxsra fxlognot fxlogor