diff --git a/bin/ikarus b/bin/ikarus index c865636..2148ad4 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus-collect.c b/bin/ikarus-collect.c index 0c5f459..16b61e6 100644 --- a/bin/ikarus-collect.c +++ b/bin/ikarus-collect.c @@ -1044,6 +1044,14 @@ add_object_proc(gc_t* gc, ikp x) ref(x, wordsize-vector_tag) = y; return y; } + else if(fst == flonum_tag){ + ikp new = gc_alloc_new_data(flonum_size, gen, gc) + vector_tag; + ref(new, -vector_tag) = flonum_tag; + flonum_data(new) = flonum_data(x); + ref(x, -vector_tag) = forward_ptr; + ref(x, wordsize-vector_tag) = new; + return new; + } else if((((int)fst) & bignum_mask) == bignum_tag){ int len = ((unsigned int)fst) >> bignum_length_shift; int memreq = align(disp_bignum_data + len*wordsize); @@ -1053,14 +1061,6 @@ add_object_proc(gc_t* gc, ikp x) ref(x, wordsize-vector_tag) = new; return new; } - else if(fst == flonum_tag){ - ikp new = gc_alloc_new_data(flonum_size, gen, gc) + vector_tag; - ref(new, -vector_tag) = flonum_tag; - flonum_data(new) = flonum_data(x); - ref(x, -vector_tag) = forward_ptr; - ref(x, wordsize-vector_tag) = new; - return new; - } else { fprintf(stderr, "unhandled vector with fst=0x%08x\n", (int)fst); exit(-1); diff --git a/bin/ikarus-data.h b/bin/ikarus-data.h index b1faae8..d1dfb3c 100644 --- a/bin/ikarus-data.h +++ b/bin/ikarus-data.h @@ -189,14 +189,14 @@ #define bignum_mask 0x7 -#define bignum_tag 0x2 +#define bignum_tag 0x3 #define bignum_sign_mask 0x8 #define bignum_sign_shift 3 #define bignum_length_shift 4 #define disp_bignum_data wordsize #define off_bignum_data (disp_bignum_data - vector_tag) -#define flonum_tag ((ikp)0x6F) +#define flonum_tag ((ikp)0x17) #define flonum_size 16 #define disp_flonum_data 8 #define off_flonum_data (disp_flonum_data - vector_tag) diff --git a/bin/ikarus-numerics.c b/bin/ikarus-numerics.c index 74e5581..bf8123a 100644 --- a/bin/ikarus-numerics.c +++ b/bin/ikarus-numerics.c @@ -11,6 +11,9 @@ #define max_digits_per_limb 10 +#ifdef NDEBUG +#define verify_bignum(x,caller) (x) +#else static ikp verify_bignum(ikp x, char* caller){ if(tagof(x) != vector_tag){ @@ -58,6 +61,7 @@ verify_bignum(ikp x, char* caller){ /* ok */ return x; } +#endif #define BN(x) verify_bignum(x,"BN") diff --git a/src/ikarus.boot b/src/ikarus.boot index 7dd6b96..5027512 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/libnumerics.ss b/src/libnumerics.ss index f475177..64150aa 100644 --- a/src/libnumerics.ss +++ b/src/libnumerics.ss @@ -40,7 +40,7 @@ (define binary+ (lambda (x y) (cond - [(fixnum? x) + [(fixnum? x) (cond [(fixnum? y) (foreign-call "ikrt_fxfxplus" x y)]