From 36ca90b8c977289c3aedcde08996b1ea0d73c08c Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Fri, 17 Dec 2010 17:32:08 -0800 Subject: [PATCH] Fix tag table entry for flonum for 64-bit platforms. --- src/runtime/generic.scm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/runtime/generic.scm b/src/runtime/generic.scm index 39e4d2afb..f99311375 100644 --- a/src/runtime/generic.scm +++ b/src/runtime/generic.scm @@ -423,14 +423,18 @@ USA. ((memq object '(#!optional #!rest #!key #!aux)) keyword-tag) (else constant-tag))))))) - (assign-type 'FLONUM - (let ((flonum-vector-tag - (make-built-in-tag '(FLONUM-VECTOR)))) - (lambda (default-tag) - (lambda (object) - (if (fix:= 2 (system-vector-length object)) - default-tag - flonum-vector-tag))))) + + ;; Flonum length can change size on different architectures, so we + ;; measure one. + (let ((flonum-length (system-vector-length microcode-id/floating-epsilon))) + (assign-type 'FLONUM + (let ((flonum-vector-tag + (make-built-in-tag '(FLONUM-VECTOR)))) + (lambda (default-tag) + (lambda (object) + (if (fix:= flonum-length (system-vector-length object)) + default-tag + flonum-vector-tag)))))) (assign-type 'RECORD (let ((dt-tag (make-built-in-tag '(DISPATCH-TAG)))) (lambda (default-tag) -- 2.25.1