From 78d9fa1f4218a4d5c1682bbeebf26f95b6fdfbac Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sun, 20 Jul 2008 00:14:09 -0700 Subject: [PATCH] In 64-bit, ikarus now passes all tests, can recompile itself, and runs all benchmarks (inefficiently but correctly). --- scheme/ikarus.compiler.altcogen.ss | 4 +++- scheme/ikarus.compiler.ss | 18 ++++++++++++------ scheme/last-revision | 2 +- src/ikarus-collect.c | 4 ---- src/ikarus-data.h | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/scheme/ikarus.compiler.altcogen.ss b/scheme/ikarus.compiler.altcogen.ss index 9cc8379..22e8fdb 100644 --- a/scheme/ikarus.compiler.altcogen.ss +++ b/scheme/ikarus.compiler.altcogen.ss @@ -2896,7 +2896,9 @@ (addl eax eax) ; double the number of args (movl eax (mem (fx* -2 wordsize) fpr)) ; pass it as first arg (movl (int (argc-convention 1)) eax) ; setup argc - (movl (primref-loc 'do-vararg-overflow) cpr) ; load handler + (movl (obj (primref->symbol 'do-vararg-overflow)) cpr) + (movl (mem (- disp-symbol-record-proc record-tag) cpr) cpr) + ;(movl (primref-loc 'do-vararg-overflow) cpr) ; load handler (compile-call-frame 0 '#() '(int 0) (indirect-cpr-call)) (popl eax) ; pop framesize and drop it (popl eax) ; reload argc diff --git a/scheme/ikarus.compiler.ss b/scheme/ikarus.compiler.ss index 02c7681..8c64110 100644 --- a/scheme/ikarus.compiler.ss +++ b/scheme/ikarus.compiler.ss @@ -2097,9 +2097,9 @@ "https://bugs.launchpad.net/ikarus/+filebug") (make-irritants-condition (list op)))))])) -(define (primref-loc op) - (mem (fx- disp-symbol-record-proc record-tag) - (obj (primref->symbol op)))) +;(define (primref-loc op) +; (mem (fx- disp-symbol-record-proc record-tag) +; (obj (primref->symbol op)))) @@ -2210,7 +2210,9 @@ (movl cpr (mem (fx- 0 wordsize) fpr)) ; first arg (negl eax) (movl eax (mem (fx- 0 (fx* 2 wordsize)) fpr)) - (movl (primref-loc '$incorrect-args-error-handler) cpr) + (movl (obj (primref->symbol '$incorrect-args-error-handler)) cpr) + (movl (mem (- disp-symbol-record-proc record-tag) cpr) cpr) + ;(movl (primref-loc '$incorrect-args-error-handler) cpr) (movl (int (argc-convention 2)) eax) (tail-indirect-cpr-call)))) SL_invalid_args] @@ -2228,7 +2230,9 @@ (list (list 0 (label SL_multiple_values_error_rp) - (movl (primref-loc '$multiple-values-error) cpr) + (movl (obj (primref->symbol '$multiple-values-error)) cpr) + (movl (mem (- disp-symbol-record-proc record-tag) cpr) cpr) + ;(movl (primref-loc '$multiple-values-error) cpr) (tail-indirect-cpr-call)))) SL_multiple_values_error_rp] [(sl-values-label) @@ -2256,7 +2260,9 @@ (list 0 (label SL_nonprocedure) (movl cpr (mem (fx- 0 wordsize) fpr)) ; first arg - (movl (primref-loc '$apply-nonprocedure-error-handler) cpr) + (movl (obj (primref->symbol '$apply-nonprocedure-error-handler)) cpr) + (movl (mem (- disp-symbol-record-proc record-tag) cpr) cpr) + ;(movl (primref-loc '$apply-nonprocedure-error-handler) cpr) (movl (int (argc-convention 1)) eax) (tail-indirect-cpr-call)))) SL_nonprocedure] diff --git a/scheme/last-revision b/scheme/last-revision index e496d6e..df9d396 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1543 +1544 diff --git a/src/ikarus-collect.c b/src/ikarus-collect.c index 9017be7..9b97385 100644 --- a/src/ikarus-collect.c +++ b/src/ikarus-collect.c @@ -374,7 +374,6 @@ extern void verify_integrity(ikpcb* pcb, char*); ikpcb* ik_collect(unsigned long int mem_req, ikpcb* pcb){ -// fprintf(stderr, "ik_collect ...\n"); #ifndef NDEBUG verify_integrity(pcb, "entry"); #endif @@ -561,9 +560,6 @@ ik_collect(unsigned long int mem_req, ikpcb* pcb){ pcb->collect_rtime.tv_usec += 1000000; pcb->collect_rtime.tv_sec -= 1; } - - - //fprintf(stderr, "ik_collect done\n"); return pcb; } diff --git a/src/ikarus-data.h b/src/ikarus-data.h index 53e8a0f..fb80b4e 100644 --- a/src/ikarus-data.h +++ b/src/ikarus-data.h @@ -206,7 +206,7 @@ ikptr ik_unsafe_alloc(ikpcb* pcb, int size); ikptr ik_safe_alloc(ikpcb* pcb, int size); #define IK_HEAP_EXT_SIZE (32 * 4096) -#define IK_HEAPSIZE (1024 * ((wordsize==4)?1:32) * 4096) /* 4/8 MB */ +#define IK_HEAPSIZE (1024 * ((wordsize==4)?1:2) * 4096) /* 4/8 MB */ #define wordsize ((int)(sizeof(ikptr))) #define wordshift ((wordsize == 4)?2:3)